Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LeanFrontier/Analysis/Nesbitt.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Mathlib.Data.Real.Basic
import Mathlib.Basic.Real.Basic
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Positivity
Expand Down
2 changes: 1 addition & 1 deletion LeanFrontier/Analysis/SlopeMinorant.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Mathlib.Data.Finset.Lattice.Fold
import Mathlib.Data.Real.Basic
import Mathlib.Basic.Real.Basic
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring

Expand Down
2 changes: 1 addition & 1 deletion LeanFrontier/Combinatorics/CircularDominoTilings.lean
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ theorem card_circularOneTwoTilings_add_two (n : ℕ) :
obtain ⟨l, -, rfl⟩ := Finset.mem_image.mp hxFalse
obtain ⟨r, -, h⟩ := Finset.mem_image.mp hxTrue
simp at h
rw [circularOneTwoTilings, if_pos htwo, hsub,
rw [circularOneTwoTilings, ite_eq_left htwo, hsub,
Finset.card_union_of_disjoint hdisj,
Finset.card_image_of_injective _ (by
intro a b h
Expand Down
4 changes: 2 additions & 2 deletions LeanFrontier/Dynamics/LogisticMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ noncomputable def tentMap (x : ℝ) : ℝ := if x ≤ 1 / 2 then 2 * x else 2 *
/-- The logistic map at parameter four, `x ↦ 4 * x * (1 - x)`, extended to all of `ℝ`. -/
def logisticMap (x : ℝ) : ℝ := 4 * x * (1 - x)

theorem tentMap_of_le {x : ℝ} (h : x ≤ 1 / 2) : tentMap x = 2 * x := if_pos h
theorem tentMap_of_le {x : ℝ} (h : x ≤ 1 / 2) : tentMap x = 2 * x := ite_eq_left h

theorem tentMap_of_half_lt {x : ℝ} (h : 1 / 2 < x) : tentMap x = 2 * (1 - x) :=
if_neg (not_le.mpr h)
ite_eq_right (not_le.mpr h)

/-- The identity behind both branches of the semiconjugacy: doubling the angle inside
`sin ^ 2` is applying the logistic map outside. -/
Expand Down
2 changes: 1 addition & 1 deletion LeanFrontier/Geometry/InversiveGeometry.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Mathlib.Data.Complex.Basic
import Mathlib.Basic.Complex.Basic
import Mathlib.Tactic.LinearCombination

/-!
Expand Down
4 changes: 2 additions & 2 deletions LeanFrontier/NumberTheory/SternBrocot/NodeInterval.lean
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ theorem mediant_bounds_eq_pair (path : List Bool) :
| cons dir path ih =>
rw [bounds_cons]
cases dir
· simp only [mapBounds, mapPair, Bool.false_eq_true, if_false, Prod.fst, Prod.snd, pair]
· simp only [mapBounds, mapPair, Bool.false_eq_true, ite_false, Prod.fst, Prod.snd, pair]
constructor
· exact ih.1
· rw [Nat.cast_add]
omega
· simp only [mapBounds, mapPair, if_true, Prod.fst, Prod.snd, pair]
· simp only [mapBounds, mapPair, ite_true, Prod.fst, Prod.snd, pair]
constructor
· rw [Nat.cast_add]
omega
Expand Down
4 changes: 2 additions & 2 deletions LeanFrontier/NumberTheory/SternDiatomic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ theorem fusc_two_mul (n : ℕ) : fusc (2 * n) = fusc n := by
· have hm : 2 * (k + 1) = 2 * k + 2 := by ring
have heven : (2 * k + 2) % 2 = 0 := by omega
have hdiv : (2 * k + 2) / 2 = k + 1 := by omega
rw [hm, fusc, if_pos heven, hdiv]
rw [hm, fusc, ite_eq_left heven, hdiv]

/-- An odd index splits into the two neighbouring values at half the index. -/
theorem fusc_two_mul_add_one (n : ℕ) : fusc (2 * n + 1) = fusc n + fusc (n + 1) := by
Expand All @@ -74,7 +74,7 @@ theorem fusc_two_mul_add_one (n : ℕ) : fusc (2 * n + 1) = fusc n + fusc (n + 1
· have hm : 2 * (k + 1) + 1 = (2 * k + 1) + 2 := by ring
have hodd : ¬ ((2 * k + 1 + 2) % 2 = 0) := by omega
have hdiv : (2 * k + 1 + 2) / 2 = k + 1 := by omega
rw [hm, fusc, if_neg hodd, hdiv]
rw [hm, fusc, ite_eq_right hodd, hdiv]

/-- Consecutive values of Stern's diatomic sequence are coprime, so the fraction
`fusc n / fusc (n + 1)` is always in lowest terms. -/
Expand Down
4 changes: 2 additions & 2 deletions LeanFrontier/NumberTheory/ThueMorse.lean
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ theorem thueMorse_two_mul_add_one (n : ℕ) : thueMorse (2 * n + 1) = !thueMorse
theorem thueMorseSign_eq_ite (n : ℕ) :
thueMorseSign n = if thueMorse n then -1 else 1 := by
rcases Nat.even_or_odd (Nat.digits 2 n).sum with h | h
· rw [thueMorseSign, h.neg_one_pow, if_neg]
· rw [thueMorseSign, h.neg_one_pow, ite_eq_right]
simp [thueMorse, Nat.not_odd_iff_even, h]
· rw [thueMorseSign, h.neg_one_pow, if_pos]
· rw [thueMorseSign, h.neg_one_pow, ite_eq_left]
simp [thueMorse, h]

private theorem thueMorseSign_two_mul (n : ℕ) : thueMorseSign (2 * n) = thueMorseSign n := by
Expand Down
12 changes: 6 additions & 6 deletions LeanFrontier/Topology/Furstenberg.lean
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ topology. -/
theorem isTopologicalBasis_arithProgression :
@IsTopologicalBasis ℤ furstenbergTopology
{S : Set ℤ | ∃ a b, b ≠ 0 ∧ S = arithProgression a b} := by
letI := furstenbergTopology
let := furstenbergTopology
refine ⟨?_, ?_, rfl⟩
· rintro t₁ ⟨a₁, b₁, hb₁, rfl⟩ t₂ ⟨a₂, b₂, hb₂, rfl⟩ x ⟨hx₁, hx₂⟩
refine ⟨arithProgression x (b₁ * b₂), ⟨x, b₁ * b₂, mul_ne_zero hb₁ hb₂, rfl⟩,
Expand All @@ -94,7 +94,7 @@ theorem isTopologicalBasis_arithProgression :
/-- Arithmetic progressions with nonzero step are open. -/
theorem isOpen_arithProgression (a b : ℤ) (hb : b ≠ 0) :
IsOpen[furstenbergTopology] (arithProgression a b) := by
letI := furstenbergTopology
let := furstenbergTopology
exact isTopologicalBasis_arithProgression.isOpen ⟨a, b, hb, rfl⟩

/-- Arithmetic progressions with nonzero step are closed: after reducing to a positive
Expand All @@ -103,7 +103,7 @@ residues. Together with `isOpen_arithProgression`, the basic sets of the Fursten
topology are clopen. -/
theorem isClosed_arithProgression (a : ℤ) {b : ℤ} (hb : b ≠ 0) :
IsClosed[furstenbergTopology] (arithProgression a b) := by
letI := furstenbergTopology
let := furstenbergTopology
have habs : arithProgression a b = arithProgression a |b| :=
Set.ext fun x => (abs_dvd b (x - a)).symm
have hpos : 0 < |b| := abs_pos.mpr hb
Expand Down Expand Up @@ -148,7 +148,7 @@ theorem infinite_arithProgression (a : ℤ) {b : ℤ} (hb : b ≠ 0) :
arithmetic progression around each of its points. -/
theorem infinite_of_isOpen {U : Set ℤ} (hU : IsOpen[furstenbergTopology] U)
(hne : U.Nonempty) : U.Infinite := by
letI := furstenbergTopology
let := furstenbergTopology
obtain ⟨x, hx⟩ := hne
obtain ⟨V, ⟨a, b, hb, rfl⟩, -, hVU⟩ :=
isTopologicalBasis_arithProgression.exists_subset_of_mem_open hx hU
Expand All @@ -159,7 +159,7 @@ the integers other than `1` and `-1`. -/
theorem iUnion_prime_arithProgression :
⋃ p ∈ {p : ℕ | p.Prime}, arithProgression 0 (p : ℤ) = ({1, -1} : Set ℤ)ᶜ := by
ext x
simp only [mem_iUnion, mem_setOf_eq, mem_arithProgression, sub_zero, mem_compl_iff,
simp only [mem_iUnion, mem_ofPred_eq, mem_arithProgression, sub_zero, mem_compl_iff,
mem_insert_iff, mem_singleton_iff, exists_prop]
constructor
· rintro ⟨p, hp, hdvd⟩ h
Expand Down Expand Up @@ -190,7 +190,7 @@ theorem infinite_of_iUnion_eq_compl {S : Set ℕ} (h0 : 0 ∉ S)
by_contra hinf
rw [Set.not_infinite] at hinf
have hfin : S.Finite := hinf
letI := furstenbergTopology
let := furstenbergTopology
have hclosed : IsClosed (⋃ p ∈ S, arithProgression 0 (p : ℤ)) :=
hfin.isClosed_biUnion fun p hp =>
isClosed_arithProgression 0 (Int.natCast_ne_zero.mpr (fun h => h0 (h ▸ hp)))
Expand Down
32 changes: 26 additions & 6 deletions docs/CONTRIBUTION-DIRECTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ crossing the Markov uniqueness-conjecture boundary.

### A. Largest Ford circle between Farey neighbours

**Current corpus fit:** ready to investigate.
**Status:** landed as `LeanFrontier.FordCircle.mediant_is_unique_largest_in_farey_gap`
(`LeanFrontier/Geometry/FareyFordCircle.lean`). Build on it rather than restating it.

**Primary parents:**

Expand Down Expand Up @@ -133,7 +134,8 @@ gap."

### B. Ford–Farey–Descartes configuration

**Current corpus fit:** ready to investigate.
**Status:** landed as `LeanFrontier.FordCircle.farey_mediant_descartes_configuration`
(`LeanFrontier/Geometry/FordCircleDescartes.lean`). Build on it rather than restating it.

**Primary parents:**

Expand Down Expand Up @@ -176,7 +178,10 @@ gives `DescartesCircle` a genuine geometric interpretation.

### C. Lucas numbers as characteristic-polynomial data of Fibonacci Q-matrix powers

**Current corpus fit:** ready to investigate.
**Status:** partly covered by D. `LeanFrontier.Horadam.trace_fibMatrix_pow_succ_eq_lucas`
proves the trace form, and the general companion-matrix power characteristic polynomial has
landed, so the statement below may now be a short corollary. Check the catalogue before
submitting it.

**Primary parents:**

Expand Down Expand Up @@ -219,8 +224,10 @@ recurrence, determinant, and Binet-style work.

### D. General Horadam companion matrix

**Current corpus fit:** high-value infrastructure; verify the live catalogue before
implementation.
**Status:** landed in `LeanFrontier/LinearAlgebra/HoradamCompanionMatrix.lean` and
`HoradamCompanionMatrixSpecializations.lean`, including the explicit power formula, trace,
determinant and characteristic-polynomial identities, and the Fibonacci/Lucas specialization.
Build on it rather than restating it.

**Primary parents:**

Expand Down Expand Up @@ -272,6 +279,9 @@ specializations, and later Binet-style results.

### E. Circular square/domino tilings counted by Lucas numbers

**Status:** landed as `LeanFrontier.Nat.card_circularOneTwoTilings_add_two`
(`LeanFrontier/Combinatorics/CircularDominoTilings.lean`).

**Primary parents:** `FibonacciComposition` + `LucasNumber`.

Classically, linear square/domino tilings are Fibonacci-counted while circular tilings are
Expand Down Expand Up @@ -303,6 +313,10 @@ modest.

### G. Maximum Stern-row value is Fibonacci

**Status:** landed as `LeanFrontier.SternDiatomic.fib_is_max_on_dyadic_row`
(`LeanFrontier/NumberTheory/SternDiatomic/RowMaximum.lean`), with attainment in both Fibonacci
orientations.

**Primary parent:** `SternDiatomic`; Fibonacci support would mainly come from Mathlib.

The classical extremal theorem says the maximum of Stern's sequence on an appropriate dyadic
Expand All @@ -320,7 +334,13 @@ Treat it as a good independent Stern extension, not as a top corpus-synthesis ta

### H. Stern diatomic / Calkin–Wilf to Stern–Brocot representation bridge

**Status:** reformulated; high effort.
**Status:** landed. Both path enumerations
(`LeanFrontier.CalkinWilf.exists_code_eq`, `LeanFrontier.SternBrocot.existsUnique_pair_of_coprime`),
the Stern–Brocot interval invariants (`LeanFrontier/NumberTheory/SternBrocot/Intervals.lean`),
and the bridge itself: `LeanFrontier.CalkinWilf.pair_reverse_eq_sternBrocot` and
`pair_eq_sternBrocot_iff_reverse` (`LeanFrontier/NumberTheory/CalkinWilfSternBrocot.lean`)
show that a Calkin–Wilf path and a Stern–Brocot path reach the same pair exactly when they are
reverses. Traversal orders are not identified; that remains open.

**Critical correction:**

Expand Down
Loading