Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Original primary same-deployment source and nominal prices

Definition
APFSameDeploymentSource

by FiniteUniverse · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

apftf1

Formal coverage of existing original source content. Primary original operational occupancy and pointwise joint-service inhabitance are retained physical source inputs, not newly derived existence. The checked erasure runs TO old SourceB06, with no generic converse. Original protocol, task, support, full occurrence and own account stay matched. Written source meaning, executable witnesses, Lean proof and recursive foundation acceptance are distinct. Independent scientific review accepted the exact original-source formalization and its foundation correspondence; this record retains that scope. No observed execution, changed output, full transport or quantum reconstruction claim.

Definition code
import Definitions.Def_APFTF1Source

/-! AWO195 exact repair02. Primary original source presentation.
Primitive original physical content and its inhabitance are source inputs;
compilation checks elimination, not a new physical existence law. -/
set_option autoImplicit false
universe uC uJ uE uO
namespace APFSameDeployment
open APFTF1 APFOriginalProcess APFOriginalSource APFUpstreamOccupant
open APFPaper1.Foundation APFOriginalFinitePossibilities APFOriginalAdmission

variable {Γ : Type*} {Raw FullProcess Resource Support : Γ → Type*}
variable [∀ γ, AddCommMonoid (Resource γ)] [∀ γ, Preorder (Resource γ)]
variable {T : OriginalTyping Γ FullProcess}
variable {P : ∀ γ, Set (FullProcess γ)}
variable {A : ∀ γ, Account (R := Resource γ) (P γ)}

/-- Complete nominal catalogue. No affordable-use or Deployment supplier. -/
structure Catalog (U : UseSource (Raw := Raw) T P A)
    (D : ∀ γ, Set (PhysicalState (Profile U γ) → Bool)) where
  maintained : ∀ γ, ProtocolView (P γ) → Set (Support γ)
  sufficient : ∀ γ, ProtocolView (P γ) → Set (Support γ) → Task U D γ → Prop
  Claim : ∀ γ, ProtocolView (P γ) → Type uC
  task : ∀ {γ p}, Claim γ p → Task U D γ
  support : ∀ {γ p}, Claim γ p → Set (Support γ)
  isMaintained : ∀ {γ p} (c : Claim γ p), support c ⊆ maintained γ p
  isSufficient : ∀ {γ p} (c : Claim γ p), sufficient γ p (support c) (task c)
  Joint : ∀ γ, Finset (Task U D γ) → ProtocolView (P γ) → Type uJ
  member : ∀ {γ S p} (j : Joint γ S p) (d : Task U D γ),
    d ∈ S → {c : Claim γ p // task c = d}
  separator : ∀ γ (d : Task U D γ), ∃ a b, d.val a ≠ d.val b
  physicalClaim : ∀ γ (d : Task U D γ), ∃ p, ∃ c : Claim γ p, task c = d

variable {U : UseSource (Raw := Raw) T P A}
variable {D : ∀ γ, Set (PhysicalState (Profile U γ) → Bool)}

def Catalog.relations (N : Catalog (Support := Support) U D) (γ : Γ) :
    Relations (R := Resource γ) (Record := Support γ) (Profile U γ) (D γ) (P γ) where
  maintained := N.maintained γ
  sufficient := N.sufficient γ
  usesToRealize := fun p d σ => ∃ c : N.Claim γ p, N.task c = d ∧ N.support c = σ
  jointClass := fun S => {p | Nonempty (N.Joint γ S p)}
  joint_support := by
    intro S p hj d hd
    obtain ⟨j⟩ := hj
    obtain ⟨c, hc⟩ := N.member j d hd
    refine ⟨N.support c, N.isMaintained c, ?_, c, hc, rfl⟩
    simpa only [hc] using N.isSufficient c
  physical := by
    intro d
    obtain ⟨p, c, hc⟩ := N.physicalClaim γ d
    refine ⟨N.separator γ d, p, N.support c, N.isMaintained c, ?_, c, hc, rfl⟩
    simpa only [hc] using N.isSufficient c

/-- One staged primary source. physical is the full unfiltered F/account/within
packet; catalog is nominal. Enforces retains original source referents. -/
structure Primary (T : OriginalTyping Γ FullProcess)
    (P : ∀ γ, Set (FullProcess γ))
    (A : ∀ γ, Account (R := Resource γ) (P γ)) where
  physical : UseSource.{uO} (Raw := Raw) T P A
  distinctions : ∀ γ, Set (PhysicalState (Profile physical γ) → Bool)
  catalog : Catalog.{uC,uJ} (Support := Support) physical distinctions
  Enforces : ∀ {γ p}, catalog.Claim γ p → Type uE
  input : ∀ {γ p c}, Enforces (γ := γ) (p := p) c → Raw γ
  boundary : ∀ {γ p c}, Enforces (γ := γ) (p := p) c → Raw ((T γ).outputContext p.val)
  referent : ∀ {γ p c} (e : Enforces (γ := γ) (p := p) c),
    physical.occurrence γ p.val (input e) (boundary e)
  ownWhole : ∀ {γ p c} (e : Enforces (γ := γ) (p := p) c),
    physical.account (referent e) = AccountView.originalWhole p.property

namespace Primary

variable (R : Primary (Raw := Raw) (Support := Support) T P A)

abbrev K (γ : Γ) := R.catalog.relations γ
abbrev UseTuple (γ : Γ) (p : ProtocolView (P γ)) :=
  Σ x : Raw γ, Σ b : Raw ((T γ).outputContext p.val), R.physical.occurrence γ p.val x b

def enforcingTuple {γ p c} (e : R.Enforces (γ := γ) (p := p) c) : R.UseTuple γ p :=
  ⟨R.input e, R.boundary e, R.referent e⟩

def phi (f : Focus R.physical R.distinctions) :
    Fulfillment (Support := Support) R.physical f :=
  fun σ x b w => ∃ (c : R.catalog.Claim f.1 f.2.1) (e : R.Enforces c),
    R.catalog.task c = f.2.2 ∧ R.catalog.support c = σ ∧
    R.enforcingTuple e = (⟨x,b,w.val⟩ : R.UseTuple f.1 f.2.1)

def deploymentOf {γ p} (d : Task R.physical R.distinctions γ) (σ : Set (Support γ))
    (c : R.catalog.Claim γ p) (e : R.Enforces c)
    (hd : R.catalog.task c = d) (hs : R.catalog.support c = σ) :
    Deployment R.physical ⟨γ,p,d⟩ (R.phi ⟨γ,p,d⟩) σ where
  input := R.input e
  boundary := R.boundary e
  use := ⟨R.referent e, R.ownWhole e⟩
  fulfills := ⟨c,e,hd,hs,rfl⟩

/-- Pointwise source service for this complete joint implementation.
No common output or global nominal availability is required. -/
structure JointService (γ : Γ) (S : Finset (Task R.physical R.distinctions γ)) where
  protocol : ProtocolView (P γ)
  joint : R.catalog.Joint γ S protocol
  service : ∀ d (hd : d ∈ S), R.Enforces (R.catalog.member joint d hd).val

structure OccupancyPresentation
    (actualJoint : Set (Σ γ, OriginalAlignment (Profile R.physical γ) (R.distinctions γ))) where
  context : Γ
  alignment : OriginalAlignment (Profile R.physical context) (R.distinctions context)
  actual : (⟨context,alignment⟩ : Σ γ, OriginalAlignment (Profile R.physical γ) (R.distinctions γ)) ∈ actualJoint
  nonempty : alignment.carried.Nonempty
  ledger : originalCost (toOriginalData (A context) (R.K context)) alignment.carried ≤
    ((A context).capacity : ENNReal)
  implementation : R.JointService context alignment.carried

abbrev OriginalOperationalOccupancy
    (actualJoint : Set (Σ γ, OriginalAlignment (Profile R.physical γ) (R.distinctions γ))) : Prop :=
  Nonempty (R.OccupancyPresentation actualJoint)

def nominalPrices (γ : Γ) (S : Finset (Task R.physical R.distinctions γ)) : Set ENNReal :=
  {v | ∃ (p : ProtocolView (P γ)) (_j : R.catalog.Joint γ S p),
    ((A γ).calibration ((A γ).wholeResource p) : ENNReal) = v}

end Primary
end APFSameDeployment
Source
P1 original source; exact local package and acceptance evidence must accompany release.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me