OAI/Computability/TypeSystem/Wrappers.lean
118 declarations, 0 contain sorry, 0 declared as axioms
Finite simultaneous normal data witnesses. Feasibility is semantic, so these lemmas do not assume a profile-generation conjecture. The extra inhabitants are genuine fresh context variables.
- def
OAI.PureTypeSystem.Labelled.Expr.dataline 12 - theorem
OAI.PureTypeSystem.Labelled.Expr.erase_dataline 20 - theorem
OAI.PureTypeSystem.Labelled.Expr.data_renameline 23 - theorem
OAI.PureTypeSystem.Labelled.Expr.data_substline 27 - theorem
OAI.PureTypeSystem.Labelled.Expr.data_instantiateline 35 - theorem
OAI.PureTypeSystem.Labelled.Expr.data_allDataline 41 - theorem
OAI.PureTypeSystem.Labelled.Expr.data_wellModedline 49 - def
OAI.PureTypeSystem.Labelled.Expr.arrowline 65Source documentation
Nondependent labelled arrow; its codomain is shifted, not captured.
def arrow (l : Label) (A B : Expr S) : Expr S := .pi l A (B.rename Nat.succ)
Mentions: OAI.PureTypeSystem.Labelled.Label, OAI.PureTypeSystem.Labelled.Expr
- def
OAI.PureTypeSystem.Labelled.Expr.constLamline 66 - theorem
OAI.PureTypeSystem.Labelled.Expr.arrow_renameline 68 - theorem
OAI.PureTypeSystem.Labelled.Expr.arrow_substline 73 - theorem
OAI.PureTypeSystem.Labelled.Expr.constLam_renameline 78 - theorem
OAI.PureTypeSystem.Labelled.Expr.constLam_substline 83 - theorem
OAI.PureTypeSystem.Labelled.Expr.instantiate_raiseline 88 - theorem
OAI.PureTypeSystem.Labelled.Beta.dataline 94 - theorem
OAI.PureTypeSystem.Labelled.Converts.dataline 108 - theorem
OAI.PureTypeSystem.Labelled.HasType.dataline 118 - theorem
OAI.PureTypeSystem.Labelled.HasType.arrowline 132 - theorem
OAI.PureTypeSystem.Labelled.HasType.constLamline 136 - theorem
OAI.PureTypeSystem.Labelled.HasType.apply_arrowline 141 - theorem
OAI.PureTypeSystem.Labelled.WellModed.data_subst_congrline 149Source documentation
Data syntax cannot inspect a proof-mode image, even inside annotations.
theorem data_subst_congr {M : Expr S} {m : Mode} (h : WellModed γ M m) (hm : m = .data) (σ τ : Nat → Expr S) (he : ∀ n, γ n = .data → σ n = τ n) : M.subst σ = M.subst τ := by …Mentions: OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode, OAI.PureTypeSystem.Labelled.WellModed
- theorem
OAI.PureTypeSystem.Labelled.WellModed.proof_instantiate_irrelevantline 177 - theorem
OAI.PureTypeSystem.Labelled.WellModed.raiseline 186 - theorem
OAI.PureTypeSystem.Labelled.WellModed.arrowline 190 - theorem
OAI.PureTypeSystem.Labelled.WellModed.constLamline 193 - def
OAI.PureTypeSystem.Labelled.SortedAtline 199Source documentation
Sorting at a profile records all source sorting judgments, not an exact profile assertion; wrappers intentionally permit profile growth.
def SortedAt {S : Type u} (P : Specification S) (Γ : List (Expr S)) (A : Expr S) (I : Set S) : Prop := ∀ s ∈ I, HasType P Γ A (.sort s) …Mentions: OAI.PureTypeSystem.Specification, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.HasType
- theorem
OAI.PureTypeSystem.Labelled.SortedAt.monoline 204 - theorem
OAI.PureTypeSystem.Labelled.SortedAt.arrowline 207 - theorem
OAI.PureTypeSystem.Labelled.SortedAt.raiseline 213 - theorem
OAI.PureTypeSystem.Labelled.positive_cancelline 219Source documentation
The exact positive product-edge lift/projection beta cancellation.
theorem positive_cancel {S : Type u} (l : Label) (D e t : Expr S) : Beta (.app l (Expr.constLam l D t) e) t := by …Mentions: OAI.PureTypeSystem.Labelled.Label, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Beta, OAI.PureTypeSystem.Labelled.Expr.constLam
- theorem
OAI.PureTypeSystem.Lookup.append_rightline 235 - theorem
OAI.PureTypeSystem.Lookup.append_leftline 240 - theorem
OAI.PureTypeSystem.ValidContext.appendline 252 - theorem
OAI.PureTypeSystem.HasType.append_rightline 264 - theorem
OAI.PureTypeSystem.HasType.append_leftline 270 - def
OAI.PureTypeSystem.HasWitnessline 277Source documentation
An actual normal witness of a feasible profile, with a declared inhabitant. All the sorting judgments, rather than one selected sort, are retained.
def HasWitness {S : Type u} (P : Specification S) (Γ : List (Expr S)) (I : Set S) : Prop := …Mentions: OAI.PureTypeSystem.Specification, OAI.PureTypeSystem.Expr
- theorem
OAI.PureTypeSystem.HasWitness.append_leftline 282 - theorem
OAI.PureTypeSystem.HasWitness.append_rightline 286 - theorem
OAI.PureTypeSystem.FeasibleProfile.witnessline 293 - theorem
OAI.PureTypeSystem.FeasibleProfile.finite_witnessesline 302 - structure
OAI.PureTypeSystem.Labelled.DataWitnessContextline 320Source documentation
The data context has no proof-mode declarations. Its finite witness terms are literal all-data embeddings and their erased types are normal.
structure DataWitnessContext {S : Type u} (P : Specification S) (F : Finset (Set S)) where …Mentions: OAI.PureTypeSystem.Specification
- theorem
OAI.PureTypeSystem.Labelled.ValidContext.dataline 329 - def
OAI.PureTypeSystem.Labelled.DataWitnessContext.ofFeasibleline 335 - theorem
OAI.PureTypeSystem.SignedPath.negative_even_suffixline 358Source documentation
Any odd walk has a negative edge with an even remaining suffix.
theorem negative_even_suffix {v w : V} (h : SignedPath E v w true) : ∃ p g, Reach E v p ∧ E p g true ∧ SignedPath E g w false := by …Mentions: OAI.PureTypeSystem.SignedPath, OAI.PureTypeSystem.Reach
- theorem
OAI.PureTypeSystem.SignedPath.restrictline 372Source documentation
Restrict a finite walk when all of its intermediate points lie in a set.
theorem restrict {C : Set V} {v w : V} {p : Bool} (h : SignedPath E v w p) (hv : v ∈ C) (hi : ∀ z, Reach E v z → Reach E z w → z ∈ C) : SignedPath (fun x y p => E x y p ∧ x ∈ C ∧ y ∈ C) v w p := by …Mentions: OAI.PureTypeSystem.SignedPath, OAI.PureTypeSystem.Reach
- theorem
OAI.PureTypeSystem.IsComponent.all_paritiesline 388Source documentation
An odd closed walk in an SCC supplies both parities between all vertices.
theorem all_parities (hC : IsComponent E C) {r v w : V} (hr : r ∈ C) (ho : SignedPath E r r true) (hv : v ∈ C) (hw : w ∈ C) (b : Bool) : SignedPath E v w b := by …Mentions: OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.SignedPath
- theorem
OAI.PureTypeSystem.IsComponent.restrict_pathline 397 - theorem
OAI.PureTypeSystem.IsComponent.return_parityline 403Source documentation
No odd cycle makes the return parity uniquely determined by the outward one.
theorem return_parity (hC : IsComponent E C) {v w : V} {b : Bool} (hv : v ∈ C) (hw : w ∈ C) (hp : SignedPath E v w b) (ho : ¬ SignedPath E v v true) : SignedPath E w v b := by …Mentions: OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.SignedPath
- theorem
OAI.PureTypeSystem.IsComponent.negative_routesline 412Source documentation
The three internal path roles needed by the first data channel, without assuming that the secondary component itself has an odd cycle.
theorem negative_routes (hC : IsComponent E C) {J k : V} (hJ : J ∈ C) (hk : k ∈ C) (hJk : E J k false) (hn : ∃ a ∈ C, ∃ b ∈ C, E a b true) : ∃ p ∈ C, ∃ g ∈ C, E p g true ∧ SignedPath E k p true ∧ SignedPath E p k true ∧ SignedPath E g J false := by …Mentions: OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.SignedPath
- theorem
OAI.PureTypeSystem.ForbiddenConfiguration.channel_pathsline 448Source documentation
Source choice-of-paths conclusion, retaining the actual triples and all profile and seed hypotheses of the forbidden configuration.
theorem channel_paths (h : ForbiddenConfiguration P C) : ∃ D : Set (Set S), IsComponent (SecondaryEdge P C) D ∧ ∃ I J k s p n g j h', ProfileTriple P I J k ∧ J ∈ D ∧ k ∈ D ∧ ({s} : Set S) ∈ D ∧ (AxProfile P s).Nonempty ∧ PositivePath (PrimaryEdge P) (AxProfile P s) I ∧ ProfileTriple P p n g ∧ p ∈ D ∧ g ∈ D ∧ n ∈ ObservationLayers P C ∧ SignedPath (SecondaryEdge P C) k p true ∧ SignedPath (SecondaryEdge P C) p k true ∧ SignedPath (SecondaryEdge P C) g J false ∧ DirectLayer P C j ∧ SignedPath (SecondaryEdge P C) k j true ∧ DirectLayer P C h' ∧ SignedPath (SecondaryEdge P C) k h' false ∧ SignedPath (SecondaryEdge P C) p h' true := by …Mentions: OAI.PureTypeSystem.ForbiddenConfiguration, OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.SecondaryEdge, OAI.PureTypeSystem.ProfileTriple, OAI.PureTypeSystem.AxProfile, OAI.PureTypeSystem.PositivePath, OAI.PureTypeSystem.PrimaryEdge, OAI.PureTypeSystem.ObservationLayers, OAI.PureTypeSystem.SignedPath, OAI.PureTypeSystem.DirectLayer
- structure
OAI.PureTypeSystem.Labelled.Embeddingline 493Source documentation
A legal mode-preserving change of names. No hypotheses about convertibility or proof existence are packed into the map.
structure Embedding {S : Type u} (P : Specification S) (Γ : List (Expr S)) (γ : Nat → Mode) (Δ : List (Expr S)) (δ : Nat → Mode) where …Mentions: OAI.PureTypeSystem.Specification, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode
- def
OAI.PureTypeSystem.Labelled.Embedding.reflline 504 - theorem
OAI.PureTypeSystem.Labelled.Embedding.typingline 510 - theorem
OAI.PureTypeSystem.Labelled.Embedding.modedline 513 - def
OAI.PureTypeSystem.Labelled.Embedding.compline 516 - def
OAI.PureTypeSystem.Labelled.Embedding.consline 522 - def
OAI.PureTypeSystem.Labelled.Embedding.liftline 529 - theorem
OAI.PureTypeSystem.Labelled.ProofContext.proof_consline 545 - theorem
OAI.PureTypeSystem.Labelled.Expr.AllData.wellModedline 557 - theorem
OAI.PureTypeSystem.Labelled.Expr.Target.arrowline 568 - structure
OAI.PureTypeSystem.Labelled.WitnessFamilyline 576Source documentation
All finite feasible witnesses with their one fixed choice of terminal type. The types remain fixed (up to renaming) during proof-context extensions.
structure WitnessFamily {S : Type u} (P : Specification S) (Γ : List (Expr S)) (γ : Nat → Mode) where …Mentions: OAI.PureTypeSystem.Specification, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode
- def
OAI.PureTypeSystem.Labelled.WitnessFamily.renameline 590 - theorem
OAI.PureTypeSystem.Labelled.WitnessFamily.exists_familyline 600 - def
OAI.PureTypeSystem.Labelled.Transferline 622Source documentation
A term transformer under one temporary proof input. No product rule is postulated for its input/output pair; that rule generally does not exist.
def Transfer {S : Type u} (P : Specification S) (Γ : List (Expr S)) (γ : Nat → Mode) (A B : Expr S) : Prop := …Mentions: OAI.PureTypeSystem.Specification, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode
- theorem
OAI.PureTypeSystem.Labelled.Transfer.reflline 629 - theorem
OAI.PureTypeSystem.Labelled.Transfer.renameline 632 - theorem
OAI.PureTypeSystem.Labelled.Transfer.transline 638 - theorem
OAI.PureTypeSystem.Labelled.Transfer.positiveline 645 - theorem
OAI.PureTypeSystem.Labelled.Transfer.converterline 656Source documentation
The declared converter is inserted before, not after, the temporary input.
theorem converter (hC : HasType P Γ (Expr.arrow .pp A B) (.sort r)) (hA : HasType P Γ A (.sort s)) : Transfer P (Expr.arrow .pp A B :: Γ) (modeCons .proof γ) (A.rename Nat.succ) (B.rename Nat.succ) := by …Mentions: OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.Expr.arrow, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.modeCons
- def
OAI.PureTypeSystem.Labelled.Provesline 675Source documentation
An actual labelled inhabitant, retaining its typing and proof mode.
def Proves (P : Specification S) (Γ : List (Expr S)) (γ : Nat → Mode) (A : Expr S) : Prop := …
Mentions: OAI.PureTypeSystem.Specification, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode
- theorem
OAI.PureTypeSystem.Labelled.Proves.renameline 681 - theorem
OAI.PureTypeSystem.Labelled.Proves.of_varline 686 - theorem
OAI.PureTypeSystem.Labelled.Proves.apply_arrowline 690 - theorem
OAI.PureTypeSystem.Labelled.Proves.constLamline 696 - theorem
OAI.PureTypeSystem.Labelled.Transfer.proveline 707 - theorem
OAI.PureTypeSystem.Labelled.Transfer.of_provesline 712 - theorem
OAI.PureTypeSystem.Labelled.Transfer.abstractline 717 - theorem
OAI.PureTypeSystem.Labelled.Transfer.apply_toline 725Source documentation
An actual argument may be data or proof; its original application label is retained, and the fresh proof input is inserted before the argument is used.
theorem apply_to {l : Label} {a : Expr S} (ha : HasType P Γ a A) (ma : WellModed γ a l.domain) (hl : l.result = .proof) (hpi : HasType P Γ (Expr.arrow l A B) (.sort s)) : Transfer P Γ γ (Expr.arrow l A B) B := by …Mentions: OAI.PureTypeSystem.Labelled.Label, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.Expr.arrow, OAI.PureTypeSystem.Labelled.Transfer
- theorem
OAI.PureTypeSystem.Labelled.Transfer.apply_to_proofline 739 - theorem
OAI.PureTypeSystem.Labelled.edge_profilesline 751 - def
OAI.PureTypeSystem.Labelled.Carriesline 760Source documentation
The converter-routing construction retains its finite admissible context, its exact renaming of the original input, and the normal positive carried type.
def Carries (Γ : List (Expr S)) (γ : Nat → Mode) (T : Expr S) (J : Set S) : Prop := …
Mentions: OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode
- theorem
OAI.PureTypeSystem.Labelled.WitnessFamily.carry_edgeline 770 - theorem
OAI.PureTypeSystem.Labelled.WitnessFamily.carry_pathline 812Source documentation
Each negative edge resets the carried type to a fixed terminal, and is followed by its own positive lift. Thus every converter domain stays positive.
theorem carry_path {b : Bool} (hp : SignedPath (PrimaryEdge P) I J b) (hI : FeasibleProfile P I) (hv : ValidContext P Γ) (hc : ProofContext Γ γ) (hT : T.Target) (hm : WellModed γ T .data) (ht : SortedAt P Γ T I) : Carries (P := P) Γ γ T J := by …Mentions: OAI.PureTypeSystem.SignedPath, OAI.PureTypeSystem.PrimaryEdge, OAI.PureTypeSystem.FeasibleProfile, OAI.PureTypeSystem.Labelled.ValidContext, OAI.PureTypeSystem.Labelled.ProofContext, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.SortedAt, OAI.PureTypeSystem.Labelled.Carries
- theorem
OAI.PureTypeSystem.Labelled.WitnessFamily.terminal_transferline 833Source documentation
Terminal-converter existence. Both terminal types are the original, fixed witnesses; only legal renaming is applied.
theorem terminal_transfer {C : Set (Set S)} (hC : IsComponent (PrimaryEdge P) C) {I₁ J₁ K₁ I₂ J₂ K₂ : Set S} (h₁ : ProfileTriple P I₁ J₁ K₁) (hk₁ : K₁ ∈ C) (h₂ : ProfileTriple P I₂ J₂ K₂) (hi₂ : I₂ ∈ C) (hv : ValidContext P Γ) (hc : ProofContext Γ γ) : ∃ Δ δ, ∃ e : Embedding P Γ γ Δ δ, ProofContext Δ δ ∧ Transfer P Δ δ ((W.type J₁).rename e.names) ((W.type J₂).rename e.names) := by …Mentions: OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.PrimaryEdge, OAI.PureTypeSystem.ProfileTriple, OAI.PureTypeSystem.Labelled.ValidContext, OAI.PureTypeSystem.Labelled.ProofContext, OAI.PureTypeSystem.Labelled.Embedding, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.WitnessFamily.rename
- def
OAI.PureTypeSystem.Labelled.TerminalProfileline 862Source documentation
The fixed terminals are exactly the codomains of the internal domain edges of the logic SCC. This includes the chosen logical bottom.
def TerminalProfile (P : Specification S) (C : Set (Set S)) (J : Set S) : Prop := …
Mentions: OAI.PureTypeSystem.Specification
- theorem
OAI.PureTypeSystem.Labelled.TerminalProfile.feasibleline 865 - theorem
OAI.PureTypeSystem.Labelled.WitnessFamily.finite_terminal_networkline 876Source documentation
Previously constructed routes survive every new converter declaration. The finite induction performs all context extensions before any logical input.
theorem finite_terminal_network (hC : IsComponent (PrimaryEdge P) C) (F : Finset (Set S × Set S)) (hF : ∀ q ∈ F, TerminalProfile P C q.1 ∧ TerminalProfile P C q.2) (hv : ValidContext P Γ) (hc : ProofContext Γ γ) : ∃ Δ δ, ∃ e : Embedding P Γ γ Δ δ, ProofContext Δ δ ∧ ∀ q ∈ F, Transfer P Δ δ ((W.type q.1).rename e.names) ((W.type q.2).rename e.names) := by …Mentions: OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.PrimaryEdge, OAI.PureTypeSystem.Labelled.TerminalProfile, OAI.PureTypeSystem.Labelled.ValidContext, OAI.PureTypeSystem.Labelled.ProofContext, OAI.PureTypeSystem.Labelled.Embedding, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.WitnessFamily.rename
- theorem
OAI.PureTypeSystem.Labelled.WitnessFamily.terminal_networkline 900Source documentation
One fixed finite legal context has every pairwise terminal transfer.
theorem terminal_network [Fintype S] (hC : IsComponent (PrimaryEdge P) C) (hv : ValidContext P Γ) (hc : ProofContext Γ γ) : ∃ Δ δ, ∃ e : Embedding P Γ γ Δ δ, ProofContext Δ δ ∧ ∀ J J', TerminalProfile P C J → TerminalProfile P C J' → Transfer P Δ δ ((W.type J).rename e.names) ((W.type J').rename e.names) := by …Mentions: OAI.PureTypeSystem.IsComponent, OAI.PureTypeSystem.PrimaryEdge, OAI.PureTypeSystem.Labelled.ValidContext, OAI.PureTypeSystem.Labelled.ProofContext, OAI.PureTypeSystem.Labelled.Embedding, OAI.PureTypeSystem.Labelled.TerminalProfile, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.WitnessFamily.rename
- def
OAI.PureTypeSystem.Labelled.ProofParityline 914Source documentation
Uniform proof transport records open callbacks, not a meta-level implication between propositions. Every operation returns an actual typed term.
def ProofParity {Γ : List (Expr S)} {γ : Nat → Mode} (W : WitnessFamily P Γ γ) (C : Set (Set S)) (A B : Expr S) (b : Bool) : Prop := …Mentions: OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode, OAI.PureTypeSystem.Labelled.WitnessFamily
- theorem
OAI.PureTypeSystem.Labelled.ProofParity.reflline 934 - theorem
OAI.PureTypeSystem.Labelled.ProofParity.positiveline 939Source documentation
Positive paths retain the literal data witness used by projection.
theorem positive (h : ProofParity W C A B b) (hB : HasType P Γ B (.sort s)) (hD : HasType P Γ D (.sort t)) (mD : WellModed γ D .data) {d : Expr S} (hd : HasType P Γ d D) (md : WellModed γ d .data) (hpi : HasType P Γ (Expr.arrow .dp D B) (.sort r)) : ProofParity W C A (Expr.arrow .dp D B) b := by …Mentions: OAI.PureTypeSystem.Labelled.ProofParity, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Expr.arrow
- theorem
OAI.PureTypeSystem.Labelled.ProofParity.negativeline 969Source documentation
Each negative edge uses its fixed terminal; even/odd callbacks are composed only with the predeclared terminal terms.
theorem negative (h : ProofParity W C A B b) (τ : ∀ J J', TerminalProfile P C J → TerminalProfile P C J' → Transfer P Γ γ (W.type J) (W.type J')) {J₀ : Set S} (hJ₀ : TerminalProfile P C J₀) (hB : HasType P Γ B (.sort s)) (mB : WellModed γ B .data) (hpi : HasType P Γ (Expr.arrow .pp B (W.type J₀)) (.sort r)) : ProofParity W C A (Expr.arrow .pp B (W.type J₀)) (!b) := by …Mentions: OAI.PureTypeSystem.Labelled.ProofParity, OAI.PureTypeSystem.Labelled.TerminalProfile, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.Expr.arrow
- def
OAI.PureTypeSystem.Labelled.Continuationline 1010Source documentation
A continuation is tested after every legal extension; callbacks are actual open terms with one proof input, not arbitrary functions on inhabitation.
def Continuation {Γ : List (Expr S)} {γ : Nat → Mode} (W : WitnessFamily P Γ γ) (C : Set (Set S)) (Q : Expr S) : Prop := …Mentions: OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode, OAI.PureTypeSystem.Labelled.WitnessFamily
- def
OAI.PureTypeSystem.Labelled.StableExtractionline 1019Source documentation
The extraction property proved for sorted stable telescopes. It is not an extra PTS rule: the following constructors explicitly build its proof terms.
def StableExtraction {Γ : List (Expr S)} {γ : Nat → Mode} (W : WitnessFamily P Γ γ) (C : Set (Set S)) (Q : Expr S) : Prop := …Mentions: OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode, OAI.PureTypeSystem.Labelled.WitnessFamily
- theorem
OAI.PureTypeSystem.Labelled.Continuation.renameline 1027 - theorem
OAI.PureTypeSystem.Labelled.Transfer.project_piline 1040Source documentation
Project a dependent product at its newly opened raw argument, retaining the argument's actual data/proof label.
theorem project_pi {l : Label} (hA : HasType P Γ A (.sort s)) (hpi : HasType P Γ (.pi l A B) (.sort t)) (hl : l.result = .proof) : Transfer P (A :: Γ) (modeCons l.domain γ) ((Expr.pi l A B).rename Nat.succ) B := by …Mentions: OAI.PureTypeSystem.Labelled.Label, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.modeCons, OAI.PureTypeSystem.Labelled.Transfer.rename
- theorem
OAI.PureTypeSystem.Labelled.StableExtraction.renameline 1064 - theorem
OAI.PureTypeSystem.Labelled.StableExtraction.terminalline 1071 - theorem
OAI.PureTypeSystem.Labelled.StableExtraction.productline 1082Source documentation
Dependent telescope step. The continuation is threaded under the raw binder; the raw projection supplies the callback at exactly that locally opened value.
theorem product {l : Label} (hA : HasType P Γ A (.sort s)) (mA : WellModed γ A .data) (hpi : HasType P Γ (.pi l A B) (.sort t)) (hl : l.result = .proof) (hB : StableExtraction (W.rename (Embedding.cons hA l.domain)) C B) : StableExtraction W C (.pi l A B) := by …Mentions: OAI.PureTypeSystem.Labelled.Label, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.StableExtraction, OAI.PureTypeSystem.Labelled.Embedding.cons
- theorem
OAI.PureTypeSystem.Labelled.StableExtraction.arrowline 1120Source documentation
Constant arrows are the special telescope step used by every path edge.
theorem arrow {l : Label} (hA : HasType P Γ A (.sort s)) (mA : WellModed γ A .data) (hpi : HasType P Γ (Expr.arrow l A B) (.sort t)) (hl : l.result = .proof) (hB : StableExtraction W C B) : StableExtraction W C (Expr.arrow l A B) := …Mentions: OAI.PureTypeSystem.Labelled.Label, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.Expr.arrow, OAI.PureTypeSystem.Labelled.StableExtraction
- theorem
OAI.PureTypeSystem.Labelled.ProofParity.intoline 1132 - theorem
OAI.PureTypeSystem.Labelled.ProofParity.downline 1138Source documentation
Stable even-path retraction, including dependent stable telescopes.
theorem down (h : ProofParity W C A B false) (hs : StableExtraction W C A) (hB : HasType P Γ B (.sort t)) : Transfer P Γ γ B A := by …Mentions: OAI.PureTypeSystem.Labelled.ProofParity, OAI.PureTypeSystem.Labelled.StableExtraction, OAI.PureTypeSystem.Labelled.HasType, OAI.PureTypeSystem.Labelled.Transfer
- inductive
OAI.PureTypeSystem.Labelled.ProofWrapperline 1154Source documentation
Fixed hygienic wrapper syntax. The code is selected once from a path, never reselected when an input is substituted or its sorting profile grows.
inductive ProofWrapper (S : Type u) | identity | positive : ProofWrapper S → Expr S → ProofWrapper S | negative : ProofWrapper S → Expr S → ProofWrapper S namespace ProofWrapper
Mentions: OAI.PureTypeSystem.Labelled.Expr
- def
OAI.PureTypeSystem.Labelled.ProofWrapper.applyline 1161 - def
OAI.PureTypeSystem.Labelled.ProofWrapper.renameline 1166 - def
OAI.PureTypeSystem.Labelled.ProofWrapper.substline 1171 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.apply_renameline 1176 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.apply_substline 1180 - def
OAI.PureTypeSystem.Labelled.ProofWrapper.containsNegativeline 1184 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.rename_idline 1189 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.rename_compline 1192 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.instantiate_raiseline 1196 - inductive
OAI.PureTypeSystem.Labelled.ProofWrapper.Formedline 1202Source documentation
A path certificate retaining exactly its terminals, witness types and edge roles. Inclusion is a literal identity; there is no type-level cast.
inductive Formed {Γ : List (Expr S)} {γ : Nat → Mode} (W : WitnessFamily P Γ γ) (C : Set (Set S)) (I : Set S) : Set S → Bool → ProofWrapper S → Prop | identity : Formed W C I I false .identity | inclusion {J K b R} : Formed W C I J b R → K ⊆ J → Formed W C I K b R | positive {A J K b R} : Formed W C I J b R → ProfileTriple P A J K → Formed W C I K b (.positive R (W.type A)) | negative {J B K b R} : Formed W C I J b R → ProfileTriple P J B K → J ∈ C → K ∈ C → Formed W C I K (!b) (.negative R (W.type B)) namespace Formed variable {Γ : List (Expr S)} {γ : Nat → Mode} {W : WitnessFamily P Γ γ} {C : Set (Set S)} {I J K : Set S} {a b : Bool} {R : ProofWrapper S}Mentions: OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.Mode, OAI.PureTypeSystem.Labelled.WitnessFamily, OAI.PureTypeSystem.Labelled.ProofWrapper, OAI.PureTypeSystem.ProfileTriple
- theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.Formed.renameline 1215 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.Formed.edgeline 1224 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.Formed.pathline 1231 - theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.Formed.soundline 1242Source documentation
The fixed code has the actual profile sorting, mode, and parity operations.
theorem sound (h : Formed W C I J b R) (τ : ∀ J J', TerminalProfile P C J → TerminalProfile P C J' → Transfer P Γ γ (W.type J) (W.type J')) {T : Expr S} (ht : SortedAt P Γ T I) (mt : WellModed γ T .data) : SortedAt P Γ (R.apply T) J ∧ WellModed γ (R.apply T) .data ∧ ProofParity W C T (R.apply T) b := by …Mentions: OAI.PureTypeSystem.Labelled.ProofWrapper.Formed, OAI.PureTypeSystem.Labelled.TerminalProfile, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.SortedAt, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.ProofParity
- theorem
OAI.PureTypeSystem.Labelled.ProofWrapper.Formed.stableline 1269Source documentation
Every code preserves stable extraction; a negative-containing code creates it even for an initially arbitrary data type.
theorem stable (h : Formed W C I J b R) (τ : ∀ J J', TerminalProfile P C J → TerminalProfile P C J' → Transfer P Γ γ (W.type J) (W.type J')) {T : Expr S} (ht : SortedAt P Γ T I) (mt : WellModed γ T .data) : (StableExtraction W C T → StableExtraction W C (R.apply T)) ∧ (R.containsNegative = true → StableExtraction W C (R.apply T)) := by …Mentions: OAI.PureTypeSystem.Labelled.ProofWrapper.Formed, OAI.PureTypeSystem.Labelled.TerminalProfile, OAI.PureTypeSystem.Labelled.Transfer, OAI.PureTypeSystem.Labelled.Expr, OAI.PureTypeSystem.Labelled.SortedAt, OAI.PureTypeSystem.Labelled.WellModed, OAI.PureTypeSystem.Labelled.StableExtraction