Download lean/Witness.lean from Snapkitty/hyperkitty-constraint-dsl: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/lean/Witness.lean
- Command line
-
hf download hf://Snapkitty/hyperkitty-constraint-dsl/lean/Witness.lean
-
curl -L -o Witness.lean https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/lean/Witness.lean
1.49 kB
Lean 4 · 8
declarations statementsfull
structure Witness : Type where body · 1 line
w : List Glyphabbrev canonicalWitness : Witness := ⟨[Glyph.Pi, Glyph.Gamma, Glyph.Delta]⟩ abbrev evolveWitness (w : Witness) : Witness := body · 2 lines
let [a, b, c] := w.w else ⟨[]⟩;
⟨[a.next b, b.next c, c.next a]⟩theorem canonical_exhaustion :
(evolveWitness (evolveWitness canonicalWitness)).w = [Glyph.Omega, Glyph.Omega, Glyph.Omega] := by proof · 2 lines
simp [evolveWitness, canonicalWitness, Glyph.next, Q]
decidetheorem invalid_fixed_point :
evolveWitness ⟨[Glyph.Lambda, Glyph.Lambda, Glyph.Lambda]⟩ = ⟨[Glyph.Lambda, Glyph.Lambda, Glyph.Lambda]⟩ := by proof · 2 lines
simp [evolveWitness, Glyph.next, Q]
decidedef Witness.isExhausted (w : Witness) : Bool := body · 1 line
w.w.all (· = Glyph.Omega)def Witness.isInvalidFixedPoint (w : Witness) : Bool := body · 1 line
w.w.all (· = Glyph.Lambda)theorem witness_exhaustion_in_2_steps :
∀ w : Witness, w = canonicalWitness →
(evolveWitness (evolveWitness w)).isExhausted := by proof · 3 lines
intro w hw
rw [hw]
simp [Witness.isExhausted, canonical_exhaustion]Outline