OAI/Computability/TypeSystem/Reduction.lean
70 declarations, 0 contain sorry, 0 declared as axioms
- inductive
OAI.PureTypeSystem.Parallelline 10Source documentation
Parallel reduction is used only to establish the beta metatheory.
inductive Parallel {S : Type u} : Expr S → Expr S → Prop | var (n) : Parallel (.var n) (.var n) | sort (s) : Parallel (.sort s) (.sort s) | app {f f' a a'} : Parallel f f' → Parallel a a' → Parallel (.app f a) (.app f' a') | lam {A A' b b'} : Parallel A A' → Parallel b b' → Parallel (.lam A b) (.lam A' b') | pi {A A' B B'} : Parallel A A' → Parallel B B' → Parallel (.pi A B) (.pi A' B') | head {b b' a a'} (A) : Parallel b b' → Parallel a a' → Parallel (.app (.lam A b) a) (b'.instantiate a') …Mentions: OAI.PureTypeSystem.Expr
- theorem
OAI.PureTypeSystem.Parallel.reflline 26 - theorem
OAI.PureTypeSystem.Parallel.of_betaline 34 - theorem
OAI.PureTypeSystem.Parallel.renameline 44 - theorem
OAI.PureTypeSystem.Parallel.substline 56 - theorem
OAI.PureTypeSystem.Parallel.instantiateline 74 - def
OAI.PureTypeSystem.Expr.developline 89Source documentation
Takahashi's complete development, including type annotations.
def develop : Expr S → Expr S | var n => var n | sort s => sort s | app (lam _ b) a => (develop b).instantiate (develop a) | app f a => app (develop f) (develop a) | lam A b => lam (develop A) (develop b) | pi A B => pi (develop A) (develop B) end Expr namespace Parallel …
Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.Expr.instantiate, OAI.PureTypeSystem.Parallel
- theorem
OAI.PureTypeSystem.Parallel.triangleline 103 - theorem
OAI.PureTypeSystem.Parallel.diamondline 122 - abbrev
OAI.PureTypeSystem.Reducesline 127 - theorem
OAI.PureTypeSystem.Reduces.appline 133 - theorem
OAI.PureTypeSystem.Reduces.lamline 138 - theorem
OAI.PureTypeSystem.Reduces.piline 143 - theorem
OAI.PureTypeSystem.Reduces.renameline 148 - theorem
OAI.PureTypeSystem.Reduces.substline 151 - theorem
OAI.PureTypeSystem.Parallel.reducesline 160 - theorem
OAI.PureTypeSystem.Parallel.rtc_reducesline 170 - theorem
OAI.PureTypeSystem.Reduces.parallelline 179 - theorem
OAI.PureTypeSystem.Reduces.confluentline 182 - theorem
OAI.PureTypeSystem.Converts.joinline 198 - theorem
OAI.PureTypeSystem.Normal.reduces_eqline 217 - theorem
OAI.PureTypeSystem.Normal.eq_of_convertsline 222 - theorem
OAI.PureTypeSystem.Reduces.pi_invline 232 - theorem
OAI.PureTypeSystem.Reduces.convertsline 242 - theorem
OAI.PureTypeSystem.Converts.product_compatibilityline 251 - theorem
OAI.PureTypeSystem.Normal.varline 267 - theorem
OAI.PureTypeSystem.Normal.sortline 271 - theorem
OAI.PureTypeSystem.Normal.stronglyNormalizingline 275 - theorem
OAI.PureTypeSystem.StronglyNormalizing.stepline 284 - theorem
OAI.PureTypeSystem.StronglyNormalizing.reducesline 287 - theorem
OAI.PureTypeSystem.StronglyNormalizing.of_mapline 293Source documentation
SN of an image reflects along any map preserving individual reduction steps.
theorem of_map {f : Expr S → Expr S} (hf : ∀ {M N}, Beta M N → Beta (f M) (f N)) {M : Expr S} (h : StronglyNormalizing (f M)) : StronglyNormalizing M := by …Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.Beta, OAI.PureTypeSystem.StronglyNormalizing
- theorem
OAI.PureTypeSystem.StronglyNormalizing.app_leftline 306 - theorem
OAI.PureTypeSystem.StronglyNormalizing.app_rightline 309 - theorem
OAI.PureTypeSystem.StronglyNormalizing.lam_domainline 312 - theorem
OAI.PureTypeSystem.StronglyNormalizing.lam_bodyline 315 - theorem
OAI.PureTypeSystem.StronglyNormalizing.pi_domainline 318 - theorem
OAI.PureTypeSystem.StronglyNormalizing.pi_bodyline 321 - theorem
OAI.PureTypeSystem.StronglyNormalizing.of_substline 324 - theorem
OAI.PureTypeSystem.StronglyNormalizing.of_renameline 327 - theorem
OAI.PureTypeSystem.StronglyNormalizing.lamline 330 - theorem
OAI.PureTypeSystem.StronglyNormalizing.piline 342 - def
OAI.PureTypeSystem.Expr.appsline 360 - theorem
OAI.PureTypeSystem.Expr.apps_nilline 364 - theorem
OAI.PureTypeSystem.Expr.apps_consline 365 - theorem
OAI.PureTypeSystem.Expr.apps_appendline 368 - inductive
OAI.PureTypeSystem.ArgsStepline 377Source documentation
Exactly one reduction step in one term of an argument list.
inductive ArgsStep {S : Type u} : List (Expr S) → List (Expr S) → Prop | head {a a' as} : Beta a a' → ArgsStep (a :: as) (a' :: as) | tail {a as as'} : ArgsStep as as' → ArgsStep (a :: as) (a :: as')Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.Beta
- def
OAI.PureTypeSystem.StronglyNormalizingArgsline 381 - theorem
OAI.PureTypeSystem.Beta.appsline 388 - theorem
OAI.PureTypeSystem.Beta.apps_invline 395Source documentation
If the head is not a lambda, a spine step comes from its head or an argument.
theorem apps_inv {as : List (Expr S)} {N : Expr S} (hf : ∀ A b, f ≠ .lam A b) (h : Beta (f.apps as) N) : (∃ f', Beta f f' ∧ N = f'.apps as) ∨ (∃ as', ArgsStep as as' ∧ N = f.apps as') := by …Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.Beta, OAI.PureTypeSystem.ArgsStep
- theorem
OAI.PureTypeSystem.ArgsStep.appsline 416 - theorem
OAI.PureTypeSystem.Reduces.appsline 427 - theorem
OAI.PureTypeSystem.StronglyNormalizingArgs.nilline 436 - theorem
OAI.PureTypeSystem.StronglyNormalizingArgs.consline 441 - theorem
OAI.PureTypeSystem.StronglyNormalizingArgs.of_forallline 453 - theorem
OAI.PureTypeSystem.StronglyNormalizingArgs.headline 460 - theorem
OAI.PureTypeSystem.StronglyNormalizingArgs.tailline 465 - theorem
OAI.PureTypeSystem.StronglyNormalizingArgs.of_memline 470 - theorem
OAI.PureTypeSystem.StronglyNormalizing.apps_headline 485 - theorem
OAI.PureTypeSystem.StronglyNormalizing.var_appsline 489 - theorem
OAI.PureTypeSystem.StronglyNormalizing.head_expansionline 503Source documentation
The source's head-expansion lemma, with any finite argument spine. The proof uses nested accessibility induction, not a raised recursion budget or an assumed maximal reduction height.
theorem head_expansion {A b a : Expr S} {as : List (Expr S)} (hA : StronglyNormalizing A) (hb : StronglyNormalizing b) (ha : StronglyNormalizing a) (has : StronglyNormalizingArgs as) (hc : StronglyNormalizing ((b.instantiate a).apps as)) : StronglyNormalizing ((Expr.app (.lam A b) a).apps as) := by …Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.StronglyNormalizing, OAI.PureTypeSystem.StronglyNormalizingArgs, OAI.PureTypeSystem.StronglyNormalizing.lam
- inductive
OAI.PureTypeSystem.Expr.Childline 541Source documentation
Only literal syntax descent, including both annotations.
inductive Child : Expr S → Expr S → Prop | app_left (f a) : Child f (.app f a) | app_right (f a) : Child a (.app f a) | lam_domain (D m) : Child D (.lam D m) | lam_body (D m) : Child m (.lam D m) | pi_domain (D E) : Child D (.pi D E) | pi_body (D E) : Child E (.pi D E)
Mentions: OAI.PureTypeSystem.Expr
- inductive
OAI.PureTypeSystem.Expr.Subtermline 549 - theorem
OAI.PureTypeSystem.Expr.Child.beta_liftline 555 - theorem
OAI.PureTypeSystem.Expr.Child.snline 565 - theorem
OAI.PureTypeSystem.Expr.Subterm.transline 577 - theorem
OAI.PureTypeSystem.Expr.Subterm.of_childline 582 - theorem
OAI.PureTypeSystem.Expr.Subterm.beta_liftline 584 - theorem
OAI.PureTypeSystem.Expr.Subterm.snline 593 - theorem
OAI.PureTypeSystem.StronglyNormalizing.induction_subtermsline 604Source documentation
The manuscript's simultaneous reduction-height/syntax-size induction, proved directly from accessibility, without choosing a height or raising limits.
theorem induction_subterms {Q : Expr S → Prop} (step : ∀ M, StronglyNormalizing M → (∀ N, Beta M N → Q N) → (∀ N, Expr.Child N M → Q N) → Q M) {M : Expr S} (hs : StronglyNormalizing M) : Q M := by …Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.StronglyNormalizing.step, OAI.PureTypeSystem.StronglyNormalizing, OAI.PureTypeSystem.Beta, OAI.PureTypeSystem.Expr.Child
- theorem
OAI.PureTypeSystem.StronglyNormalizing.induction_descendantsline 647Source documentation
The child hypothesis can equivalently cover every proper syntactic part.
theorem induction_descendants {Q : Expr S → Prop} (step : ∀ M, StronglyNormalizing M → (∀ N, Beta M N → Q N) → (∀ N, (∃ K, Expr.Child K M ∧ Expr.Subterm N K) → Q N) → Q M) {M : Expr S} (hs : StronglyNormalizing M) : Q M := by …Mentions: OAI.PureTypeSystem.Expr, OAI.PureTypeSystem.StronglyNormalizing.step, OAI.PureTypeSystem.StronglyNormalizing, OAI.PureTypeSystem.Beta, OAI.PureTypeSystem.Expr.Child, OAI.PureTypeSystem.Expr.Subterm