def
definition
Pattern
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Patterns on GitHub at line 9.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
lambda_PBM_approx -
ionization_monotone_within_period -
entries_distinct -
anomaly_dissolved -
is_recognition_loop -
recognition_loop_has_surjection -
impulse_after_octaves_mono_decay -
octavePeriod_eq_eight -
octavePeriod_is_minimal_cover -
VolcanicForcingAsJCostImpulseCert -
utm_exists -
ledgerVecParity -
parityPattern -
parity -
attempt5 -
blockSumAligned8_periodic -
Cylinder -
firstBlockSum_eq_Z_on_cylinder -
observeAvg8_periodic_eq_Z -
Pattern -
subBlockSum8_periodic_eq_Z -
Z_of_window -
eight_tick_neutral_implies_exact -
isNeutralWindow -
eight_tick_minimal -
C2_scope -
C3_scope -
card_pattern -
CompleteCover -
cover_exact_pow -
eight_tick_min -
instFintypePattern -
min_ticks_cover -
no_surj_small -
T7_nyquist_obstruction -
T7_threshold_bijection -
binaryReflectedGray -
natToGray -
GrayCodeFacts -
grayToNat_preserves_bound
formal source
6open Classical
7open Function
8
9@[simp] def Pattern (d : Nat) := (Fin d → Bool)
10
11instance instFintypePattern (d : Nat) : Fintype (Pattern d) := by
12 dsimp [Pattern]
13 infer_instance
14
15structure CompleteCover (d : Nat) where
16 period : ℕ
17 path : Fin period → Pattern d
18 complete : Function.Surjective path
19
20/-- There exists a complete cover of exact length `2^d` for d‑dimensional patterns. -/
21theorem cover_exact_pow (d : Nat) : ∃ w : CompleteCover d, w.period = 2 ^ d := by
22 classical
23 let e := (Fintype.equivFin (Pattern d)).symm
24 refine ⟨{ period := Fintype.card (Pattern d)
25 , path := fun i => e i
26 , complete := (Fintype.equivFin (Pattern d)).symm.surjective }, ?_⟩
27 have : Fintype.card (Pattern d) = 2 ^ d := by
28 simp [Pattern, Fintype.card_bool, Fintype.card_fin]
29 exact this
30
31/-- There exists an 8‑tick complete cover for 3‑bit patterns. -/
32 theorem period_exactly_8 : ∃ w : CompleteCover 3, w.period = 8 := by
33 simpa using cover_exact_pow 3
34
35/-- Cardinality of the pattern space. -/
36lemma card_pattern (d : Nat) : Fintype.card (Pattern d) = 2 ^ d := by
37 classical
38 simp [Pattern, Fintype.card_fin] at*
39