Download lean/HyperKitty/QLG.lean from Snapkitty/hyperkitty-constraint-dsl: direct link, hf CLI and curl.
- Browser
- Download file 2.93 kB
-
https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/lean/HyperKitty/QLG.lean
- Command line
-
hf download hf://Snapkitty/hyperkitty-constraint-dsl/lean/HyperKitty/QLG.lean
-
curl -L -o QLG.lean https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/lean/HyperKitty/QLG.lean
2.93 kB
Lean 4 · 9
declarations statementsfull
theorem qlg_pi_on_sphere : QLG.canonical (Vec3.ofGlyph Glyph.Pi) := by proof · 2 lines
unfold QLG.canonical Vec3.ofGlyph
norm_numtheorem qlg_gamma_on_sphere : QLG.canonical (Vec3.ofGlyph Glyph.Gamma) := by proof · 2 lines
unfold QLG.canonical Vec3.ofGlyph
norm_numtheorem qlg_delta_on_sphere : QLG.canonical (Vec3.ofGlyph Glyph.Delta) := by proof · 2 lines
unfold QLG.canonical Vec3.ofGlyph
norm_numtheorem qlg_psi_on_sphere : QLG.canonical (Vec3.ofGlyph Glyph.Psi) := by proof · 2 lines
unfold QLG.canonical Vec3.ofGlyph
norm_numtheorem qlg_lambda_on_sphere : QLG.canonical (Vec3.ofGlyph Glyph.Lambda) := by proof · 2 lines
unfold QLG.canonical Vec3.ofGlyph
norm_numtheorem qlg_omega_on_sphere : QLG.canonical (Vec3.ofGlyph Glyph.Omega) := by proof · 2 lines
unfold QLG.canonical Vec3.ofGlyph
norm_numtheorem qlg_all_glyphs_on_sphere : ∀ g : Glyph, QLG.canonical (Vec3.ofGlyph g) := by proof · 2 lines
intro g
cases g <;> simp [QLG.canonical, Vec3.ofGlyph]theorem qlg_zero_not_on_sphere : ¬QLG.canonical {x:=0, y:=0, z:=0} := by proof · 2 lines
unfold QLG.canonical
norm_numtheorem qlg_exactly_six_solutions (v : Vec3) (h : QLG.canonical v) :
∃ g : Glyph, Vec3.ofGlyph g = v := by proof · 21 lines
unfold QLG.canonical at h
-- We prove by case analysis on x, y, z
-- If x² + y² + z² = 1, then each of x, y, z is in {-1, 0, 1}
have hx : v.x ∈ ({-1, 0, 1} : Set ℤ) := by
omega
have hy : v.y ∈ ({-1, 0, 1} : Set ℤ) := by
omega
have hz : v.z ∈ ({-1, 0, 1} : Set ℤ) := by
omega
-- Enumerate all 27 cases
interval_cases v.x <;> interval_cases v.y <;> interval_cases v.z
all_goals (
try simp at h
try omega
try (use Glyph.Pi; rfl)
try (use Glyph.Gamma; rfl)
try (use Glyph.Delta; rfl)
try (use Glyph.Psi; rfl)
try (use Glyph.Lambda; rfl)
try (use Glyph.Omega; rfl)
)Outline