Provedaitherhot-reloadidentityb846d70
Aither: foreign-type insertion preserves ordinals; same-type insertion changes them
For all and :
What the notation means · or point at any symbol
- String
- String: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
String) - x ∈ TVariables
- t, u range over String: the statement must hold for every choice. (
(t u : String)) - List
- List: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
List) - f(x)Function application
- List applied to String. Lean writes f x; papers write f(x). (
List String) - ≠Not equal
- u and t are different. (
u ≠ t) - ⟹Implies
- If u ≠ t, then typeCount(t, before + +(u)) = typeCount(t, before + +(suff…. (Between types, A → B is the type of functions from A to B.) (
u ≠ t → typeCount t (before ++ u :: suf…) - typeCount
- typeCount: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
typeCount) - =Equality
- typeCount(t, before + +(u)) and typeCount(t, before + +(suffix)) are the same. (
typeCount t (before ++ u :: suffix) = t…) - (x : T)Type ascription
- before + +(u) read as a :(suffix). Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(before ++ u :: suffix)) - +Addition
- before plus +(u). (
before ++ u) - ∧And
- Both hold: typeCount(t, before + +(t)) = typeCount(t, before + +(suff…, and typeCount(t, before + +(t)) ≠ typeCount(t, before + +(suff…. (
typeCount t (before ++ t :: suffix) = t…)
theorem aither-b846-typed-ordinal-insertion (t u : String) (before suffix : List String) :
(u ≠ t → typeCount t (before ++ u :: suffix) = typeCount t (before ++ suffix)) ∧ typeCount t (before ++ t :: suffix) = typeCount t (before ++ suffix) + 1 ∧ typeCount t (before ++ t :: suffix) ≠ typeCount t (before ++ suffix)Natural-number abstraction of codegen.nim registerRegionInit typeCounter. Insertion of a different helper type preserves this type's ordinal; inserting an earlier helper of the same type increments it. Does not promise persistent semantic identity across arbitrary structural edits.
How it was proved
- Proved
- 1 October 2026
- By
- Ajax
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Quot.sound, propext
- Proof
- 24 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.