declaration stringlengths 27 11.3k | file stringlengths 52 114 | context dict | tactic_states listlengths 1 1.24k |
|---|---|---|---|
theorem quartic_eq_zero_iff_of_q_eq_zero (ha : a ≠ 0)
(hp : p = (8 * a * c - 3 * b ^ 2) / (8 * a ^ 2))
(hqz : b ^ 3 - 4 * a * b * c + 8 * a ^ 2 * d = 0)
(hr : r =
(16 * a * b ^ 2 * c + 256 * a ^ 3 * e - 3 * b ^ 4 - 64 * a ^ 2 * b * d) / (256 * a ^ 4))
(ht : t ^ 2 = p ^ 2 - 4 * r)
(hv : v ^ 2 =... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/SolutionOfCubicQuartic.lean | {
"open": [
"Polynomial"
],
"variables": [
"{K : Type*} [Field K] (a b c d e : K) {ω p q r s t u v w x y : K}",
"[Invertible (2 : K)] [Invertible (3 : K)]",
"[Invertible (2 : K)]"
]
} | [
{
"line": "let y := x + b / (4 * a)",
"before_state": "K : Type u_1\ninst✝³ : Field K\na b c d e p r t v w : K\ninst✝² : Invertible 2\ninst✝¹ : Invertible 3\ninst✝ : Invertible 2\nha : a ≠ 0\nhp : p = (8 * a * c - 3 * b ^ 2) / (8 * a ^ 2)\nhqz : b ^ 3 - 4 * a * b * c + 8 * a ^ 2 * d = 0\nhr : r = (16 * a * ... |
lemma intervalIntegrable_min_const_sin_mul (a b : ℝ) :
IntervalIntegrable (fun (θ : ℝ) => min d (θ.sin * l)) ℙ a b := by
apply Continuous.intervalIntegrable
exact Continuous.min continuous_const (Continuous.mul Real.continuous_sin continuous_const)
| /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/BuffonsNeedle.lean | {
"open": [
"MeasureTheory (MeasureSpace IsProbabilityMeasure Measure pdf.IsUniform)",
"ProbabilityTheory Real"
],
"variables": [
""
]
} | [
{
"line": "apply Continuous.intervalIntegrable",
"before_state": "d l a b : ℝ\n⊢ IntervalIntegrable (fun θ => min d (sin θ * l)) ℙ a b",
"after_state": "case hu\nd l a b : ℝ\n⊢ Continuous fun θ => min d (sin θ * l)"
},
{
"line": "exact Continuous.min continuous_const (Continuous.mul Real.continu... |
lemma integral_min_eq_two_mul :
∫ θ in (0)..π, min d (θ.sin * l) = 2 * ∫ θ in (0)..π / 2, min d (θ.sin * l) := by
rw [← intervalIntegral.integral_add_adjacent_intervals (b := π / 2) (c := π)]
conv => lhs; arg 2; arg 1; intro θ; rw [← neg_neg θ, Real.sin_neg]
· simp_rw [intervalIntegral.integral_comp_neg fun θ... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/BuffonsNeedle.lean | {
"open": [
"MeasureTheory (MeasureSpace IsProbabilityMeasure Measure pdf.IsUniform)",
"ProbabilityTheory Real"
],
"variables": [
""
]
} | [
{
"line": "rw [← intervalIntegral.integral_add_adjacent_intervals (b := π / 2) (c := π)]",
"before_state": "d l : ℝ\n⊢ ∫ (θ : ℝ) in 0 ..π, min d (sin θ * l) = 2 * ∫ (θ : ℝ) in 0 ..π / 2, min d (sin θ * l)",
"after_state": "d l : ℝ\n⊢ (∫ (x : ℝ) in 0 ..π / 2, min d (sin x * l)) + ∫ (x : ℝ) in π / 2 ..π, ... |
lemma integral_zero_to_arcsin_min :
∫ θ in (0)..(d / l).arcsin, min d (θ.sin * l) = (1 - √(1 - (d / l) ^ 2)) * l := by
have : Set.EqOn (fun θ => min d (θ.sin * l)) (Real.sin · * l) (Set.uIcc 0 (d / l).arcsin) := by
intro θ ⟨hθ₁, hθ₂⟩
have : 0 ≤ (d / l).arcsin := Real.arcsin_nonneg.mpr (div_nonneg hd.le hl... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/BuffonsNeedle.lean | {
"open": [
"MeasureTheory (MeasureSpace IsProbabilityMeasure Measure pdf.IsUniform)",
"ProbabilityTheory Real"
],
"variables": [
""
]
} | [
{
"line": "have : Set.EqOn (fun θ => min d (θ.sin * l)) (Real.sin · * l) (Set.uIcc 0 (d / l).arcsin) :=\n by\n intro θ ⟨hθ₁, hθ₂⟩\n have : 0 ≤ (d / l).arcsin := Real.arcsin_nonneg.mpr (div_nonneg hd.le hl.le)\n simp only [min_eq_left this] at hθ₁ hθ₂\n simp only [max_eq_right this] at hθ₁ hθ₂\n have hθ_me... |
lemma integral_arcsin_to_pi_div_two_min (h : d ≤ l) :
∫ θ in (d / l).arcsin..(π / 2), min d (θ.sin * l) = (π / 2 - (d / l).arcsin) * d := by
have : Set.EqOn (fun θ => min d (θ.sin * l)) (fun _ => d) (Set.uIcc (d / l).arcsin (π / 2)) := by
intro θ ⟨hθ₁, hθ₂⟩
wlog hθ_ne_pi_div_two : θ ≠ π / 2
· simp onl... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/BuffonsNeedle.lean | {
"open": [
"MeasureTheory (MeasureSpace IsProbabilityMeasure Measure pdf.IsUniform)",
"ProbabilityTheory Real"
],
"variables": [
""
]
} | [
{
"line": "have : Set.EqOn (fun θ => min d (θ.sin * l)) (fun _ => d) (Set.uIcc (d / l).arcsin (π / 2)) :=\n by\n intro θ ⟨hθ₁, hθ₂⟩\n wlog hθ_ne_pi_div_two : θ ≠ π / 2\n · simp only [ne_eq, not_not] at hθ_ne_pi_div_two\n simp only [hθ_ne_pi_div_two]\n simp only [Real.sin_pi_div_two]\n simp only [on... |
theorem Theorems100.inverse_triangle_sum :
∀ n, ∑ k ∈ range n, (2 : ℚ) / (k * (k + 1)) = if n = 0 then 0 else 2 - (2 : ℚ) / n := by
refine sum_range_induction _ _ rfl ?_
rintro (_ | _)
· norm_num
field_simp
ring | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/InverseTriangleSum.lean | {
"open": [
"Finset"
],
"variables": []
} | [
{
"line": "refine sum_range_induction _ _ rfl ?_",
"before_state": "⊢ ∀ (n : ℕ), ∑ k ∈ range n, 2 / (↑k * (↑k + 1)) = if n = 0 then 0 else 2 - 2 / ↑n",
"after_state": "⊢ ∀ (n : ℕ), (if n + 1 = 0 then 0 else 2 - 2 / ↑(n + 1)) = (if n = 0 then 0 else 2 - 2 / ↑n) + 2 / (↑n * (↑n + 1))"
},
{
"line":... |
theorem sigma_two_pow_eq_mersenne_succ (k : ℕ) : σ 1 (2 ^ k) = mersenne (k + 1) := by
simp_rw [sigma_one_apply, mersenne, show 2 = 1 + 1 from rfl, ← geom_sum_mul_add 1 (k + 1)]
norm_num
| /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/PerfectNumbers.lean | {
"open": [
"ArithmeticFunction Finset"
],
"variables": []
} | [
{
"line": "simp_rw [sigma_one_apply, mersenne, show 2 = 1 + 1 from rfl, ← geom_sum_mul_add 1 (k + 1)]",
"before_state": "k : ℕ\n⊢ (σ 1) (2 ^ k) = mersenne (k + 1)",
"after_state": "k : ℕ\n⊢ ∑ x ∈ ((1 + 1) ^ k).divisors, x = (∑ i ∈ range (k + 1), (1 + 1) ^ i) * 1 + 1 - 1"
},
{
"line": "simp (fail... |
theorem ne_zero_of_prime_mersenne (k : ℕ) (pr : (mersenne (k + 1)).Prime) : k ≠ 0 := by
intro H
simp [H, mersenne, Nat.not_prime_one] at pr
| /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/PerfectNumbers.lean | {
"open": [
"ArithmeticFunction Finset"
],
"variables": []
} | [
{
"line": "intro H",
"before_state": "k : ℕ\npr : Nat.Prime (mersenne (k + 1))\n⊢ k ≠ 0",
"after_state": "k : ℕ\npr : Nat.Prime (mersenne (k + 1))\nH : k = 0\n⊢ False"
},
{
"line": "simp [H, mersenne, Nat.not_prime_one] at pr",
"before_state": "k : ℕ\npr : Nat.Prime (mersenne (k + 1))\nH : k... |
theorem eq_two_pow_mul_odd {n : ℕ} (hpos : 0 < n) : ∃ k m : ℕ, n = 2 ^ k * m ∧ ¬Even m := by
have h := Nat.finiteMultiplicity_iff.2 ⟨Nat.prime_two.ne_one, hpos⟩
obtain ⟨m, hm⟩ := pow_multiplicity_dvd 2 n
use multiplicity 2 n, m
refine ⟨hm, ?_⟩
rw [even_iff_two_dvd]
have hg := h.not_pow_dvd_of_multiplicity_l... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/PerfectNumbers.lean | {
"open": [
"ArithmeticFunction Finset"
],
"variables": []
} | [
{
"line": "have h := Nat.finiteMultiplicity_iff.2 ⟨Nat.prime_two.ne_one, hpos⟩",
"before_state": "n : ℕ\nhpos : 0 < n\n⊢ ∃ k m, n = 2 ^ k * m ∧ ¬Even m",
"after_state": "n : ℕ\nhpos : 0 < n\nh : FiniteMultiplicity 2 n\n⊢ ∃ k m, n = 2 ^ k * m ∧ ¬Even m"
},
{
"line": "refine_lift\n have h := Nat.... |
theorem eq_two_pow_mul_prime_mersenne_of_even_perfect {n : ℕ} (ev : Even n) (perf : Nat.Perfect n) :
∃ k : ℕ, Nat.Prime (mersenne (k + 1)) ∧ n = 2 ^ k * mersenne (k + 1) := by
have hpos := perf.2
rcases eq_two_pow_mul_odd hpos with ⟨k, m, rfl, hm⟩
use k
rw [even_iff_two_dvd] at hm
rw [Nat.perfect_iff_sum_... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/PerfectNumbers.lean | {
"open": [
"ArithmeticFunction Finset"
],
"variables": []
} | [
{
"line": "have hpos := perf.2",
"before_state": "n : ℕ\nev : Even n\nperf : n.Perfect\n⊢ ∃ k, Nat.Prime (mersenne (k + 1)) ∧ n = 2 ^ k * mersenne (k + 1)",
"after_state": "n : ℕ\nev : Even n\nperf : n.Perfect\nhpos : 0 < n\n⊢ ∃ k, Nat.Prime (mersenne (k + 1)) ∧ n = 2 ^ k * mersenne (k + 1)"
},
{
... |
theorem even_and_perfect_iff {n : ℕ} :
Even n ∧ Nat.Perfect n ↔ ∃ k : ℕ, Nat.Prime (mersenne (k + 1)) ∧
n = 2 ^ k * mersenne (k + 1) := by
constructor
· rintro ⟨ev, perf⟩
exact Nat.eq_two_pow_mul_prime_mersenne_of_even_perfect ev perf
· rintro ⟨k, pr, rfl⟩
exact ⟨even_two_pow_mul_mersenne_of_pri... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/PerfectNumbers.lean | {
"open": [
"ArithmeticFunction Finset"
],
"variables": []
} | [
{
"line": "constructor",
"before_state": "n : ℕ\n⊢ Even n ∧ n.Perfect ↔ ∃ k, Nat.Prime (mersenne (k + 1)) ∧ n = 2 ^ k * mersenne (k + 1)",
"after_state": "case mp\nn : ℕ\n⊢ Even n ∧ n.Perfect → ∃ k, Nat.Prime (mersenne (k + 1)) ∧ n = 2 ^ k * mersenne (k + 1)\n---\ncase mpr\nn : ℕ\n⊢ (∃ k, Nat.Prime (mer... |
theorem Real.tendsto_sum_one_div_prime_atTop :
Tendsto (fun n => ∑ p ∈ range n with p.Prime, 1 / (p : ℝ))
atTop atTop := by
-- Assume that the sum of the reciprocals of the primes converges.
by_contra h
-- Then there is a natural number `k` such that for all `x`, the sum of the reciprocals of primes
-... | /root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/SumOfPrimeReciprocalsDiverges.lean | {
"open": [
"Filter Finset",
"Classical in"
],
"variables": []
} | [
{
"line": "by_contra h",
"before_state": "⊢ Tendsto (fun n => ∑ p ∈ {p ∈ range n | Nat.Prime p}, 1 / ↑p) atTop atTop",
"after_state": "h : ¬Tendsto (fun n => ∑ p ∈ {p ∈ range n | Nat.Prime p}, 1 / ↑p) atTop atTop\n⊢ False"
},
{
"line": "first\n| guard_target = Not✝ _; intro h\n| refine (Decidabl... |
theorem add_one_eq_one (x : WithZero Unit) : x + 1 = 1 :=
WithZero.cases_on x (by rfl) fun h => by rfl
| /root/DuelModelResearch/mathlib4/Counterexamples/CharPZeroNeCharZero.lean | {
"open": [],
"variables": []
} | [
{
"line": "rfl",
"before_state": "x : WithZero Unit\n⊢ 0 + 1 = 1",
"after_state": "No Goals!"
},
{
"line": "eq_refl",
"before_state": "x : WithZero Unit\n⊢ 0 + 1 = 1",
"after_state": "No Goals!"
},
{
"line": "rfl",
"before_state": "x : WithZero Unit\nh : Unit\n⊢ ↑h + 1 = 1",
... |
theorem withZero_unit_charP_zero : CharP (WithZero Unit) 0 :=
⟨fun x => by cases x <;> simp⟩
| /root/DuelModelResearch/mathlib4/Counterexamples/CharPZeroNeCharZero.lean | {
"open": [],
"variables": []
} | [
{
"line": "focus\n cases x\n with_annotate_state\"<;>\" skip\n all_goals simp",
"before_state": "x : ℕ\n⊢ ↑x = 0 ↔ 0 ∣ x",
"after_state": "No Goals!"
},
{
"line": "cases x",
"before_state": "x : ℕ\n⊢ ↑x = 0 ↔ 0 ∣ x",
"after_state": "case zero\n⊢ ↑0 = 0 ↔ 0 ∣ 0\n---\ncase succ\nn✝ : ℕ\... |
theorem star_sq : star * star ≈ star := by
have le : star * star ≤ star := by
rw [le_iff_forall_lf]
constructor <;>
intro i
· apply leftMoves_mul_cases i <;>
intro _ _
case' hl => rw [mul_moveLeft_inl]
case' hr => rw [mul_moveLeft_inr]
all_goals rw [lf_iff_game_lf]; simpa using... | /root/DuelModelResearch/mathlib4/Counterexamples/GameMultiplication.lean | {
"open": [
"SetTheory PGame"
],
"variables": []
} | [
{
"line": "have le : star * star ≤ star := by\n rw [le_iff_forall_lf]\n constructor <;> intro i\n · apply leftMoves_mul_cases i <;> intro _ _\n case' hl => rw [mul_moveLeft_inl]\n case' hr => rw [mul_moveLeft_inr]\n all_goals rw [lf_iff_game_lf]; simpa using zero_lf_star\n · refine lf_zero.2 ⟨toRig... |
theorem not_irrational_rpow :
¬ ∀ a b : ℝ, Irrational a → Irrational b → 0 < a → Irrational (a ^ b) := by
push_neg
by_cases hc : Irrational (√2 ^ √2)
· use (√2 ^ √2), √2, hc, irrational_sqrt_two, by positivity
rw [← rpow_mul] <;> norm_num
rw [mul_self_sqrt] <;> norm_num
rw [rpow_two] <;> norm_num
... | /root/DuelModelResearch/mathlib4/Counterexamples/IrrationalPowerOfIrrational.lean | {
"open": [
"Real"
],
"variables": []
} | [
{
"line": "push_neg",
"before_state": "⊢ ¬∀ (a b : ℝ), Irrational a → Irrational b → 0 < a → Irrational (a ^ b)",
"after_state": "⊢ ∃ a b, Irrational a ∧ Irrational b ∧ 0 < a ∧ ¬Irrational (a ^ b)"
},
{
"line": "by_cases hc : Irrational (√2 ^ √2)",
"before_state": "⊢ ∃ a b, Irrational a ∧ Ir... |
theorem LinearMap.BilinForm.not_injOn_toQuadraticForm_isSymm.{u} :
¬∀ {R M : Type u} [CommSemiring R] [AddCommMonoid M], ∀ [Module R M],
Set.InjOn (toQuadraticMap : BilinForm R M → QuadraticForm R M) {B | B.IsSymm} := by
intro h
let F := ULift.{u} (ZMod 2)
apply B_ne_zero F
apply h (isSymm_B F) isSymm... | /root/DuelModelResearch/mathlib4/Counterexamples/QuadraticForm.lean | {
"open": [
"LinearMap",
"LinearMap.BilinForm",
"LinearMap (BilinForm)",
"LinearMap.BilinMap"
],
"variables": [
"(F : Type*) [CommRing F]"
]
} | [
{
"line": "intro h",
"before_state": "⊢ ¬∀ {R M : Type u} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],\n Set.InjOn toQuadraticMap {B | LinearMap.IsSymm B}",
"after_state": "h :\n ∀ {R M : Type u} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],... |
theorem map_toReal_nhds (a : ℝₗ) : map toReal (𝓝 a) = 𝓝[≥] toReal a := by
refine ((nhds_basis_Ico a).map _).eq_of_same_basis ?_
simpa only [toReal.image_eq_preimage] using nhdsGE_basis_Ico (toReal a)
| /root/DuelModelResearch/mathlib4/Counterexamples/SorgenfreyLine.lean | {
"open": [
"Set Filter TopologicalSpace",
"scoped Topology Filter Cardinal",
"scoped SorgenfreyLine"
],
"variables": []
} | [
{
"line": "refine ((nhds_basis_Ico a).map _).eq_of_same_basis ?_",
"before_state": "ℝₗ : Type u_1\nα✝ : Type u_2\ntoReal : ℝₗ → α✝\na : ℝₗ\n⊢ map toReal (𝓝 a) = 𝓝[≥] toReal a",
"after_state": "No Goals!"
}
] |
private lemma no_strictly_decreasing {α : Type*} [Preorder α] [WellFoundedLT α] (f : ℕ → α) {n₀ : ℕ}
(hf : ∀ n ≥ n₀, f (n + 1) < f n) : False := by
let g (n : ℕ) : α := f (n₀ + n)
have : (· > ·) ↪r (· < ·) := RelEmbedding.natGT g (fun n ↦ hf _ (by simp))
exact this.not_wellFounded_of_decreasing_seq wellFounde... | /root/DuelModelResearch/mathlib4/Counterexamples/AharoniKorman.lean | {
"open": [
"Hollom"
],
"variables": []
} | [
{
"line": "let g (n : ℕ) : α := f (n₀ + n)",
"before_state": "α : Type u_1\ninst✝¹ : Preorder α\ninst✝ : WellFoundedLT α\nf : ℕ → α\nn₀ : ℕ\nhf : ∀ n ≥ n₀, f (n + 1) < f n\n⊢ False",
"after_state": "α : Type u_1\ninst✝¹ : Preorder α\ninst✝ : WellFoundedLT α\nf : ℕ → α\nn₀ : ℕ\nhf : ∀ n ≥ n₀, f (n + 1) <... |
theorem mem_zmod_2 (a : ZMod 2) : a = 0 ∨ a = 1 := by
rcases a with ⟨_ | _, _ | _ | _ | _⟩
· exact Or.inl rfl
· exact Or.inr rfl
| /root/DuelModelResearch/mathlib4/Counterexamples/CanonicallyOrderedCommSemiringTwoMul.lean | {
"open": [],
"variables": []
} | [
{
"line": "rcases a with ⟨_ | _, _ | _ | _ | _⟩",
"before_state": "a : ZMod 2\n⊢ a = 0 ∨ a = 1",
"after_state": "case mk.zero.step.refl\n⊢ ⟨0, ⋯⟩ = 0 ∨ ⟨0, ⋯⟩ = 1\n---\ncase mk.succ.refl\n⊢ ⟨0 + 1, ⋯⟩ = 0 ∨ ⟨0 + 1, ⋯⟩ = 1"
},
{
"line": "exact Or.inl rfl",
"before_state": "case mk.zero.step.r... |
theorem add_self_zmod_2 (a : ZMod 2) : a + a = 0 := by rcases mem_zmod_2 a with (rfl | rfl) <;> rfl
| /root/DuelModelResearch/mathlib4/Counterexamples/CanonicallyOrderedCommSemiringTwoMul.lean | {
"open": [],
"variables": []
} | [
{
"line": "focus\n rcases mem_zmod_2 a with (rfl | rfl)\n with_annotate_state\"<;>\" skip\n all_goals rfl",
"before_state": "a : ZMod 2\n⊢ a + a = 0",
"after_state": "No Goals!"
},
{
"line": "rcases mem_zmod_2 a with (rfl | rfl)",
"before_state": "a : ZMod 2\n⊢ a + a = 0",
"after_stat... |
theorem add_L {a b : ℕ × ZMod 2} (ha : a ≠ (0, 1)) (hb : b ≠ (0, 1)) : a + b ≠ (0, 1) := by
rcases a with ⟨a, a2⟩
rcases b with ⟨b, b2⟩
match b with
| 0 =>
rcases mem_zmod_2 b2 with (rfl | rfl)
· simp [ha, -Prod.mk.injEq]
· cases hb rfl
| b + 1 =>
simp [(a + b).succ_ne_zero]
| /root/DuelModelResearch/mathlib4/Counterexamples/CanonicallyOrderedCommSemiringTwoMul.lean | {
"open": [
"Nxzmod2 Subtype"
],
"variables": [
"{a b : ℕ × ZMod 2}"
]
} | [
{
"line": "rcases a with ⟨a, a2⟩",
"before_state": "a b : ℕ × ZMod 2\nha : a ≠ (0, 1)\nhb : b ≠ (0, 1)\n⊢ a + b ≠ (0, 1)",
"after_state": "case mk\nb : ℕ × ZMod 2\nhb : b ≠ (0, 1)\na : ℕ\na2 : ZMod 2\nha : (a, a2) ≠ (0, 1)\n⊢ (a, a2) + b ≠ (0, 1)"
},
{
"line": "rcases b with ⟨b, b2⟩",
"befor... |
theorem mul_L {a b : ℕ × ZMod 2} (ha : a ≠ (0, 1)) (hb : b ≠ (0, 1)) : a * b ≠ (0, 1) := by
rcases a with ⟨a, a2⟩
rcases b with ⟨b, b2⟩
cases b
· rcases mem_zmod_2 b2 with (rfl | rfl) <;> rcases mem_zmod_2 a2 with (rfl | rfl) <;>
simp only [Prod.mk_mul_mk]
simp only [mul_zero]
simp only [mul_o... | /root/DuelModelResearch/mathlib4/Counterexamples/CanonicallyOrderedCommSemiringTwoMul.lean | {
"open": [
"Nxzmod2 Subtype"
],
"variables": [
"{a b : ℕ × ZMod 2}"
]
} | [
{
"line": "rcases a with ⟨a, a2⟩",
"before_state": "a b : ℕ × ZMod 2\nha : a ≠ (0, 1)\nhb : b ≠ (0, 1)\n⊢ a * b ≠ (0, 1)",
"after_state": "case mk\nb : ℕ × ZMod 2\nhb : b ≠ (0, 1)\na : ℕ\na2 : ZMod 2\nha : (a, a2) ≠ (0, 1)\n⊢ (a, a2) * b ≠ (0, 1)"
},
{
"line": "rcases b with ⟨b, b2⟩",
"befor... |
theorem UnitsInt.one_ne_neg_one : (1 : ℤˣ) ≠ -1 := by decide
| /root/DuelModelResearch/mathlib4/Counterexamples/DirectSumIsInternal.lean | {
"open": [],
"variables": []
} | [
{
"line": "decide",
"before_state": "⊢ 1 ≠ -1",
"after_state": "No Goals!"
}
] |
theorem mem_withSign_one {x : ℤ} : x ∈ ℤ≥0 ↔ 0 ≤ x :=
show _ ≤ (_ : ℤˣ) • x ↔ _ by rw [one_smul]
| /root/DuelModelResearch/mathlib4/Counterexamples/DirectSumIsInternal.lean | {
"open": [],
"variables": []
} | [
{
"line": "rw [one_smul]",
"before_state": "x : ℤ\n⊢ ?m.1883 ≤ ?m.1900 • x ↔ ?m.1976",
"after_state": "No Goals!"
},
{
"line": "rewrite [one_smul]",
"before_state": "x : ℤ\n⊢ ?m.1883 ≤ ?m.1900 • x ↔ ?m.1976",
"after_state": "x : ℤ\n⊢ ?m.1883 ≤ x ↔ ?m.1976"
},
{
"line": "with_anno... |
theorem mem_withSign_neg_one {x : ℤ} : x ∈ ℤ≤0 ↔ x ≤ 0 :=
show _ ≤ (_ : ℤˣ) • x ↔ _ by rw [Units.neg_smul, le_neg, one_smul, neg_zero]
| /root/DuelModelResearch/mathlib4/Counterexamples/DirectSumIsInternal.lean | {
"open": [],
"variables": []
} | [
{
"line": "rw [Units.neg_smul, le_neg, one_smul, neg_zero]",
"before_state": "x : ℤ\n⊢ ?m.1875 ≤ ?m.1892 • x ↔ ?m.1968",
"after_state": "No Goals!"
},
{
"line": "rewrite [Units.neg_smul, le_neg, one_smul, neg_zero]",
"before_state": "x : ℤ\n⊢ ?m.1875 ≤ ?m.1892 • x ↔ ?m.1968",
"after_stat... |
lemma Int.eq_of_pow_sub_le {d : ℕ} {m n : ℤ} (hd1 : 1 < d)
(h : |(d : ℝ) ^ (-m) - d ^ (-n)| < d ^ (-n - 1)) : m = n := by
have hd0 : 0 < d := one_pos.trans hd1
replace h : |(1 : ℝ) - d ^ (n - m)| < (d : ℝ)⁻¹ := by
rw [← mul_lt_mul_iff_of_pos_left (a := (d : ℝ) ^ (-n)) (zpow_pos _ _)]
rw [← abs_of_nonneg... | /root/DuelModelResearch/mathlib4/Counterexamples/DiscreteTopologyNonDiscreteUniformity.lean | {
"open": [
"Set Function Filter Metric"
],
"variables": []
} | [
{
"line": "have hd0 : 0 < d := one_pos.trans hd1",
"before_state": "d : ℕ\nm n : ℤ\nhd1 : 1 < d\nh : |↑d ^ (-m) - ↑d ^ (-n)| < ↑d ^ (-n - 1)\n⊢ m = n",
"after_state": "d : ℕ\nm n : ℤ\nhd1 : 1 < d\nh : |↑d ^ (-m) - ↑d ^ (-n)| < ↑d ^ (-n - 1)\nhd0 : 0 < d\n⊢ m = n"
},
{
"line": "refine_lift\n hav... |
lemma ball_eq_singleton {n : ℕ} : Metric.ball n ((2 : ℝ) ^ (-n - 1 : ℤ)) = {n} := by
ext m
constructor
· zify [zpow_natCast, mem_ball, dist_def, mem_singleton_iff]
apply Int.eq_of_pow_sub_le one_lt_two
· intro H
rw [H]
rw [mem_ball]
rw [dist_self]
apply zpow_pos two_pos
| /root/DuelModelResearch/mathlib4/Counterexamples/DiscreteTopologyNonDiscreteUniformity.lean | {
"open": [
"Set Function Filter Metric"
],
"variables": []
} | [
{
"line": "ext m",
"before_state": "n : ℕ\n⊢ ball n (2 ^ (-↑n - 1)) = {n}",
"after_state": "case h\nn m : ℕ\n⊢ m ∈ ball n (2 ^ (-↑n - 1)) ↔ m ∈ {n}"
},
{
"line": "constructor",
"before_state": "case h\nn m : ℕ\n⊢ m ∈ ball n (2 ^ (-↑n - 1)) ↔ m ∈ {n}",
"after_state": "case h.mp\nn m : ℕ\n... |
lemma idIsCauchy : CauchySeq (id : ℕ → ℕ) := by
rw [Metric.cauchySeq_iff]
refine fun ε ↦ Metric.cauchySeq_iff.mp
(@cauchySeq_of_le_geometric_two ℝ _ 1 (fun n ↦ 2 ^(-n : ℤ)) fun n ↦ le_of_eq ?_) ε
simp only [zpow_natCast]
simp only [Nat.cast_add]
simp only [Nat.cast_one]
simp only [neg_add_rev]
simp on... | /root/DuelModelResearch/mathlib4/Counterexamples/DiscreteTopologyNonDiscreteUniformity.lean | {
"open": [
"Set Function Filter Metric"
],
"variables": []
} | [
{
"line": "rw [Metric.cauchySeq_iff]",
"before_state": "⊢ CauchySeq id",
"after_state": "⊢ ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, dist (id m) (id n) < ε"
},
{
"line": "rewrite [Metric.cauchySeq_iff]",
"before_state": "⊢ CauchySeq id",
"after_state": "⊢ ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, dist (id m... |
lemma mem_range_fundamentalEntourage (S : Set (ℕ × ℕ)) :
S ∈ (range fundamentalEntourage) ↔ ∃ n, fundamentalEntourage n = S := by
simp only [Set.mem_range]
simp only [Eq.symm]
| /root/DuelModelResearch/mathlib4/Counterexamples/DiscreteTopologyNonDiscreteUniformity.lean | {
"open": [
"Set Function Filter Metric"
],
"variables": []
} | [
{
"line": "simp only [Set.mem_range]",
"before_state": "ι✝ : Sort u_1\nfundamentalEntourage : ι✝ → Set (ℕ × ℕ)\nS : Set (ℕ × ℕ)\n⊢ S ∈ range fundamentalEntourage ↔ ∃ n, fundamentalEntourage n = S",
"after_state": "No Goals!"
}
] |
theorem forgetEpsilons_apply (p : ℤ[ε]) : forgetEpsilons p = coeff p 0 :=
rfl
| /root/DuelModelResearch/mathlib4/Counterexamples/MapFloor.lean | {
"open": [
"Function Int Polynomial",
"scoped Polynomial"
],
"variables": []
} | [
{
"line": "get_elem_tactic",
"before_state": "ε : ?m.12\nforgetEpsilons : ?m.64\n⊢ ?m.74 ℤ ε",
"after_state": "No Goals!"
},
{
"line": "first\n| done\n| assumption\n| get_elem_tactic_trivial\n|\n fail \"failed to prove index is valid, possible solutions:\n - Use `have`-expressions to prove... |
theorem norm_indicator_le_one (s : Set α) (x : α) : ‖(indicator s (1 : α → ℝ)) x‖ ≤ 1 := by
simp only [Set.indicator]; split_ifs <;> norm_num
simp only [Pi.one_apply]; split_ifs <;> norm_num
| /root/DuelModelResearch/mathlib4/Counterexamples/Phillips.lean | {
"open": [
"Set BoundedContinuousFunction MeasureTheory",
"Cardinal (aleph)",
"scoped Cardinal BoundedContinuousFunction",
"BoundedAdditiveMeasure"
],
"variables": [
"{α : Type u}"
]
} | [
{
"line": "simp only [Set.indicator]",
"before_state": "α : Type u\ns : Set α\nx : α\n⊢ ‖s.indicator 1 x‖ ≤ 1",
"after_state": "α : Type u\ns : Set α\nx : α\n⊢ ‖if x ∈ s then 1 x else 0‖ ≤ 1"
},
{
"line": "focus\n split_ifs\n with_annotate_state\"<;>\" skip\n all_goals norm_num",
"before_... |
theorem sierpinski_pathological_family (Hcont : #ℝ = ℵ₁) :
∃ f : ℝ → Set ℝ, (∀ x, (univ \ f x).Countable) ∧ ∀ y, {x : ℝ | y ∈ f x}.Countable := by
rcases Cardinal.ord_eq ℝ with ⟨r, hr, H⟩
refine ⟨fun x => {y | r x y}, fun x => ?_, fun y => ?_⟩
· have : univ \ {y | r x y} = {y | r y x} ∪ {x} := by
ext y
... | /root/DuelModelResearch/mathlib4/Counterexamples/Phillips.lean | {
"open": [
"Set BoundedContinuousFunction MeasureTheory",
"Cardinal (aleph)",
"scoped Cardinal BoundedContinuousFunction",
"BoundedAdditiveMeasure"
],
"variables": [
"{α : Type u}"
]
} | [
{
"line": "rcases Cardinal.ord_eq ℝ with ⟨r, hr, H⟩",
"before_state": "Hcont : #ℝ = ℵ_ 1\n⊢ ∃ f, (∀ (x : ℝ), (univ \\ f x).Countable) ∧ ∀ (y : ℝ), {x | y ∈ f x}.Countable",
"after_state": "case intro.intro\nHcont : #ℝ = ℵ_ 1\nr : ℝ → ℝ → Prop\nhr : IsWellOrder ℝ r\nH : (#ℝ).ord = Ordinal.type r\n⊢ ∃ f, ... |
theorem zero_divisors_of_periodic {R A} [Nontrivial R] [Ring R] [AddMonoid A] {n : ℕ} (a : A)
(n2 : 2 ≤ n) (na : n • a = a) (na1 : (n - 1) • a ≠ 0) :
∃ f g : R[A], f ≠ 0 ∧ g ≠ 0 ∧ f * g = 0 := by
refine ⟨single a 1, single ((n - 1) • a) 1 - single 0 1, by simp, ?_, ?_⟩
· exact sub_ne_zero.mpr (by simpa [sin... | /root/DuelModelResearch/mathlib4/Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean | {
"open": [
"Finsupp hiding single",
"AddMonoidAlgebra"
],
"variables": []
} | [
{
"line": "refine ⟨single a 1, single ((n - 1) • a) 1 - single 0 1, by simp, ?_, ?_⟩",
"before_state": "R : Type u_1\nA : Type u_2\ninst✝² : Nontrivial R\ninst✝¹ : Ring R\ninst✝ : AddMonoid A\nn : ℕ\na : A\nn2 : 2 ≤ n\nna : n • a = a\nna1 : (n - 1) • a ≠ 0\n⊢ ∃ f g, f ≠ 0 ∧ g ≠ 0 ∧ f * g = 0",
"after_st... |
example : LinearOrder F := by infer_instance
| /root/DuelModelResearch/mathlib4/Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean | {
"open": [
"Finsupp hiding single",
"AddMonoidAlgebra",
"Lean Elab Command in"
],
"variables": []
} | [
{
"line": "infer_instance",
"before_state": "F : Type ?u.7\n⊢ LinearOrder F",
"after_state": "No Goals!"
},
{
"line": "exact inferInstance✝",
"before_state": "F : Type ?u.7\n⊢ LinearOrder F",
"after_state": "No Goals!"
}
] |
example : AddMonoid F := by infer_instance
| /root/DuelModelResearch/mathlib4/Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean | {
"open": [
"Finsupp hiding single",
"AddMonoidAlgebra",
"Lean Elab Command in"
],
"variables": []
} | [
{
"line": "infer_instance",
"before_state": "F : Type ?u.7\n⊢ AddMonoid F",
"after_state": "No Goals!"
},
{
"line": "exact inferInstance✝",
"before_state": "F : Type ?u.7\n⊢ AddMonoid F",
"after_state": "No Goals!"
}
] |
example : ¬UniqueProds ℕ := by
rintro ⟨h⟩
refine not_not.mpr (h (Finset.singleton_nonempty 0) (Finset.insert_nonempty 0 {1})) ?_
simp [UniqueMul, not_or]
| /root/DuelModelResearch/mathlib4/Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean | {
"open": [
"Finsupp hiding single",
"AddMonoidAlgebra",
"Lean Elab Command in"
],
"variables": []
} | [
{
"line": "rintro ⟨h⟩",
"before_state": "⊢ ¬UniqueProds ℕ",
"after_state": "case mk\nh : ∀ {A B : Finset ℕ}, A.Nonempty → B.Nonempty → ∃ a0 ∈ A, ∃ b0 ∈ B, UniqueMul A B a0 b0\n⊢ False"
},
{
"line": "refine not_not.mpr (h (Finset.singleton_nonempty 0) (Finset.insert_nonempty 0 { 1 })) ?_",
"b... |
example (n : ℕ) (n2 : 2 ≤ n) : ¬UniqueSums (ZMod n) := by
haveI : Fintype (ZMod n) := @ZMod.fintype n ⟨(zero_lt_two.trans_le n2).ne'⟩
haveI : Nontrivial (ZMod n) := CharP.nontrivial_of_char_ne_one (one_lt_two.trans_le n2).ne'
rintro ⟨h⟩
refine not_not.mpr (h Finset.univ_nonempty Finset.univ_nonempty) ?_
suffi... | /root/DuelModelResearch/mathlib4/Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean | {
"open": [
"Finsupp hiding single",
"AddMonoidAlgebra",
"Lean Elab Command in"
],
"variables": []
} | [
{
"line": "haveI : Fintype (ZMod n) := @ZMod.fintype n ⟨(zero_lt_two.trans_le n2).ne'⟩",
"before_state": "n : ℕ\nn2 : 2 ≤ n\n⊢ ¬UniqueSums (ZMod n)",
"after_state": "n : ℕ\nn2 : 2 ≤ n\nthis : Fintype (ZMod n)\n⊢ ¬UniqueSums (ZMod n)"
},
{
"line": "refine_lift\n haveI : Fintype (ZMod n) := @ZMod... |
theorem infinite_of_charZero (R A : Type*) [CommRing R] [Ring A] [Algebra R A]
[CharZero A] : { x : A | IsAlgebraic R x }.Infinite := by
letI := MulActionWithZero.nontrivial R A
exact infinite_of_injective_forall_mem Nat.cast_injective isAlgebraic_nat
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AlgebraicCard.lean | {
"open": [
"Cardinal Polynomial Set",
"Cardinal Polynomial"
],
"variables": []
} | [
{
"line": "letI := MulActionWithZero.nontrivial R A",
"before_state": "R : Type u_1\nA : Type u_2\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : CharZero A\n⊢ {x | IsAlgebraic R x}.Infinite",
"after_state": "R : Type u_1\nA : Type u_2\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ :... |
theorem cardinalMk_le_max : #{ x : A // IsAlgebraic R x } ≤ max #R ℵ₀ := by
rw [← lift_id #_]
rw [← lift_id #R]
exact cardinalMk_lift_le_max R A
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AlgebraicCard.lean | {
"open": [
"Cardinal Polynomial Set",
"Cardinal Polynomial"
],
"variables": [
"(R : Type u) (A : Type v) [CommRing R] [CommRing A] [IsDomain A] [Algebra R A]",
"[Countable R]",
"(R A : Type u) [CommRing R] [CommRing A] [IsDomain A] [Algebra R A]"
]
} | [
{
"line": "rw [← lift_id #_]",
"before_state": "R A : Type u\ninst✝³ : CommRing R\ninst✝² : CommRing A\ninst✝¹ : IsDomain A\ninst✝ : Algebra R A\n⊢ #{ x // IsAlgebraic R x } ≤ max #R ℵ₀",
"after_state": "R A : Type u\ninst✝³ : CommRing R\ninst✝² : CommRing A\ninst✝¹ : IsDomain A\ninst✝ : Algebra R A\n⊢ ... |
lemma injective_of_surjective_of_injective_of_injective (hi₁ : Function.Surjective i₁)
(hi₂ : Function.Injective i₂) (hi₄ : Function.Injective i₄) : Function.Injective i₃ := by
rw [injective_iff_map_eq_zero]
intro m hm
obtain ⟨x, rfl⟩ := (hf₂ m).mp <| by
suffices h : i₄ (f₃ m) = 0 by rwa [map_eq_zero_iff ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FiveLemma.lean | {
"open": [],
"variables": [
"{M₁ M₂ M₃ M₄ M₅ N₁ N₂ N₃ N₄ N₅ : Type*}",
"[AddGroup M₁] [AddGroup M₂] [AddGroup M₃] [AddGroup M₄] [AddGroup M₅]",
"[AddGroup N₁] [AddGroup N₂] [AddGroup N₃] [AddGroup N₄] [AddGroup N₅]",
"(f₁ : M₁ →+ M₂) (f₂ : M₂ →+ M₃) (f₃ : M₃ →+ M₄) (f₄ : M₄ →+ M₅)",
"(g₁ : N₁ →... | [
{
"line": "rw [injective_iff_map_eq_zero]",
"before_state": "M₁ : Type u_1\nM₂ : Type u_2\nM₃ : Type u_3\nM₄ : Type u_4\nN₁ : Type u_6\nN₂ : Type u_7\nN₃ : Type u_8\nN₄ : Type u_9\ninst✝⁷ : AddGroup M₁\ninst✝⁶ : AddGroup M₂\ninst✝⁵ : AddGroup M₃\ninst✝⁴ : AddGroup M₄\ninst✝³ : AddGroup N₁\ninst✝² : AddGroup... |
theorem commute_eps_left [Semiring R] (x : DualNumber R) : Commute ε x := by
ext <;> simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/DualNumber.lean | {
"open": [
"DualNumber",
"TrivSqZeroExt"
],
"variables": [
"{R A B : Type*}"
]
} | [
{
"line": "focus\n ext\n with_annotate_state\"<;>\" skip\n all_goals simp",
"before_state": "R : Type u_1\ninst✝ : Semiring R\nx : R[ε]\n⊢ Commute ε x",
"after_state": "No Goals!"
},
{
"line": "ext",
"before_state": "R : Type u_1\ninst✝ : Semiring R\nx : R[ε]\n⊢ Commute ε x",
"after_s... |
lemma exact_zero_iff_injective {M N : Type*} (P : Type*)
[AddCommGroup M] [AddCommGroup N] [AddCommMonoid P] [Module R N] [Module R M]
[Module R P] (f : M →ₗ[R] N) :
Function.Exact (0 : P →ₗ[R] M) f ↔ Function.Injective f := by
simp [← ker_eq_bot, exact_iff]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Exact.lean | {
"open": [
"Function",
"AddMonoidHom",
"Function"
],
"variables": [
"{R M M' N N' P P' : Type*}",
"(f : M → N) (g : N → P) (g' : P → P')",
"{f g}",
"[AddGroup M] [AddGroup N] [AddGroup P] {f : M →+ N} {g : N →+ P}",
"{X₁ X₂ X₃ Y₁ Y₂ Y₃ : Type*} [AddCommMonoid X₁] [AddCommMonoid X₂... | [
{
"line": "simp [← ker_eq_bot, exact_iff]",
"before_state": "R : Type u_14\ninst✝⁶ : Ring R\nM : Type u_18\nN : Type u_19\nP : Type u_20\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R N\ninst✝¹ : Module R M\ninst✝ : Module R P\nf : M →ₗ[R] N\n⊢ Exact ⇑0 ⇑f ↔ I... |
lemma exact_zero_iff_surjective {M N : Type*} (P : Type*)
[AddCommGroup M] [AddCommGroup N] [AddCommMonoid P] [Module R N] [Module R M]
[Module R P] (f : M →ₗ[R] N) :
Function.Exact f (0 : N →ₗ[R] P) ↔ Function.Surjective f := by
simp [← range_eq_top, exact_iff, eq_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Exact.lean | {
"open": [
"Function",
"AddMonoidHom",
"Function"
],
"variables": [
"{R M M' N N' P P' : Type*}",
"(f : M → N) (g : N → P) (g' : P → P')",
"{f g}",
"[AddGroup M] [AddGroup N] [AddGroup P] {f : M →+ N} {g : N →+ P}",
"{X₁ X₂ X₃ Y₁ Y₂ Y₃ : Type*} [AddCommMonoid X₁] [AddCommMonoid X₂... | [
{
"line": "simp [← range_eq_top, exact_iff, eq_comm]",
"before_state": "R : Type u_14\ninst✝⁶ : Ring R\nM : Type u_18\nN : Type u_19\nP : Type u_20\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R N\ninst✝¹ : Module R M\ninst✝ : Module R P\nf : M →ₗ[R] N\n⊢ Exac... |
theorem Exact.split_tfae' (h : Function.Exact f g) :
List.TFAE [
Function.Injective f ∧ ∃ l, g ∘ₗ l = LinearMap.id,
Function.Surjective g ∧ ∃ l, l ∘ₗ f = LinearMap.id,
∃ e : N ≃ₗ[R] M × P, f = e.symm ∘ₗ LinearMap.inl R M P ∧ g = LinearMap.snd R M P ∘ₗ e] := by
tfae_have 1 → 3
| ⟨hf, l, hl⟩ => ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Exact.lean | {
"open": [
"Function",
"AddMonoidHom",
"Function",
"LinearMap",
"LinearMap"
],
"variables": [
"{R M M' N N' P P' : Type*}",
"(f : M → N) (g : N → P) (g' : P → P')",
"{f g}",
"[AddGroup M] [AddGroup N] [AddGroup P] {f : M →+ N} {g : N →+ P}",
"{X₁ X₂ X₃ Y₁ Y₂ Y₃ : Type*} [A... | [
{
"line": "tfae_have 1 → 3\n | ⟨hf, l, hl⟩ => ⟨_, (h.splitSurjectiveEquiv hf ⟨l, hl⟩).2⟩",
"before_state": "R : Type u_14\nM : Type u_15\nN : Type u_16\nP : Type u_17\ninst✝⁷ : Ring R\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : AddCommGroup P\ninst✝² : Module R M\ninst✝... |
theorem Exact.split_tfae
{R M N P} [Semiring R] [AddCommGroup M] [AddCommGroup N]
[AddCommGroup P] [Module R M] [Module R N] [Module R P] {f : M →ₗ[R] N} {g : N →ₗ[R] P}
(h : Function.Exact f g) (hf : Function.Injective f) (hg : Function.Surjective g) :
List.TFAE [
∃ l, g ∘ₗ l = LinearMap.id,
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Exact.lean | {
"open": [
"Function",
"AddMonoidHom",
"Function",
"LinearMap",
"LinearMap"
],
"variables": [
"{R M M' N N' P P' : Type*}",
"(f : M → N) (g : N → P) (g' : P → P')",
"{f g}",
"[AddGroup M] [AddGroup N] [AddGroup P] {f : M →+ N} {g : N →+ P}",
"{X₁ X₂ X₃ Y₁ Y₂ Y₃ : Type*} [A... | [
{
"line": "tfae_have 1 ↔ 3 := by simpa using (h.splitSurjectiveEquiv hf).nonempty_congr",
"before_state": "R : Type u_18\nM : Type u_19\nN : Type u_20\nP : Type u_21\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : AddCommGroup P\ninst✝² : Module R M\ninst✝¹ : Module R N\nins... |
lemma exact_iff_of_surjective_of_bijective_of_injective
{M₁ M₂ M₃ N₁ N₂ N₃ : Type*} [AddCommMonoid M₁] [AddCommMonoid M₂] [AddCommMonoid M₃]
[AddCommMonoid N₁] [AddCommMonoid N₂] [AddCommMonoid N₃]
[Module R M₁] [Module R M₂] [Module R M₃]
[Module R N₁] [Module R N₂] [Module R N₃]
(f : M₁ →ₗ[R] M₂) ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Exact.lean | {
"open": [
"Function",
"AddMonoidHom",
"Function",
"LinearMap",
"LinearMap",
"LinearMap Submodule"
],
"variables": [
"{R M M' N N' P P' : Type*}",
"(f : M → N) (g : N → P) (g' : P → P')",
"{f g}",
"[AddGroup M] [AddGroup N] [AddGroup P] {f : M →+ N} {g : N →+ P}",
"{X₁... | [
{
"line": "ext",
"before_state": "R : Type u_14\ninst✝¹⁵ : Ring R\ninst✝¹⁴ inst✝¹³ : Semiring R\ninst✝¹² : Ring R\nM₁ : Type u_18\nM₂ : Type u_19\nM₃ : Type u_20\nN₁ : Type u_21\nN₂ : Type u_22\nN₃ : Type u_23\ninst✝¹¹ : AddCommMonoid M₁\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCo... |
theorem length_mul (x y : FreeSemigroup α) : (x * y).length = x.length + y.length := by
simp [length, Nat.add_right_comm, List.length, List.length_append]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Free.lean | {
"open": [],
"variables": [
"{α : Type u}",
"{α : Type u} {β : Type v} [Mul β] (f : α → β)",
"{α : Type u} {β : Type v} (f : α → β)",
"{α β : Type u}",
"{α : Type u}",
"{β : Type u}",
"{m : Type u → Type u} [Applicative m] (F : α → m β)",
"{α : Type u} [Mul α]",
"{β : Type v} [S... | [
{
"line": "simp [length, Nat.add_right_comm, List.length, List.length_append]",
"before_state": "α : Type u\nx y : FreeSemigroup α\n⊢ (x * y).length = x.length + y.length",
"after_state": "No Goals!"
}
] |
theorem hom_ext {β : Type v} [Mul β] {f g : FreeSemigroup α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g :=
(DFunLike.ext _ _) fun x ↦
FreeSemigroup.recOnMul x (congr_fun h) fun x y hx hy ↦ by simp only [map_mul, *]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Free.lean | {
"open": [],
"variables": [
"{α : Type u}",
"{α : Type u} {β : Type v} [Mul β] (f : α → β)",
"{α : Type u} {β : Type v} (f : α → β)",
"{α β : Type u}",
"{α : Type u}",
"{β : Type u}",
"{m : Type u → Type u} [Applicative m] (F : α → m β)",
"{α : Type u} [Mul α]",
"{β : Type v} [S... | [
{
"line": "simp only [map_mul, *]",
"before_state": "α : Type u\nα✝ : Sort u_1\nof : α✝ → FreeSemigroup α\nβ : Type v\ninst✝ : Mul β\nf g : FreeSemigroup α →ₙ* β\nh : ⇑f ∘ of = ⇑g ∘ of\nx✝ : FreeSemigroup α\nx : α\ny : FreeSemigroup α\nhx : f (FreeSemigroup.of x) = g (FreeSemigroup.of x)\nhy : f y = g y\n⊢ ... |
theorem pow_mem_graded (n : ℕ) {r : R} {i : ι} (h : r ∈ A i) : r ^ n ∈ A (n • i) := by
match n with
| 0 =>
rw [pow_zero]
rw [zero_nsmul]
exact one_mem_graded _
| n+1 =>
rw [pow_succ']
rw [succ_nsmul']
exact mul_mem_graded h (pow_mem_graded n h)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GradedMonoid.lean | {
"open": [],
"variables": [
"{ι : Type*}",
"{α β} {A : ι → Type*}",
"(A : ι → Type*)",
"{A}",
"[AddMonoid ι] [GMul A] [GOne A]",
"(A : ι → Type*)",
"[Zero ι] [GOne A]",
"[AddZeroClass ι] [GMul A]",
"{A}",
"[AddMonoid ι] [GMonoid A]",
"{A} in",
"[AddCommMonoid ι] [GCo... | [
{
"line": "match n with\n| 0 =>\n rw [pow_zero]\n rw [zero_nsmul]\n exact one_mem_graded _\n| n + 1 =>\n rw [pow_succ']\n rw [succ_nsmul']\n exact mul_mem_graded h (pow_mem_graded n h)",
"before_state": "ι : Type u_1\ninst✝⁴ : AddMonoid ι\nR : Type u_8\nS : Type u_9\ninst✝³ : SetLike S R\ninst✝² : Mon... |
theorem list_prod_map_mem_graded {ι'} (l : List ι') (i : ι' → ι) (r : ι' → R)
(h : ∀ j ∈ l, r j ∈ A (i j)) : (l.map r).prod ∈ A (l.map i).sum := by
match l with
| [] =>
rw [List.map_nil]
rw [List.map_nil]
rw [List.prod_nil]
rw [List.sum_nil]
exact one_mem_graded _
| head::tail =>
rw [L... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GradedMonoid.lean | {
"open": [],
"variables": [
"{ι : Type*}",
"{α β} {A : ι → Type*}",
"(A : ι → Type*)",
"{A}",
"[AddMonoid ι] [GMul A] [GOne A]",
"(A : ι → Type*)",
"[Zero ι] [GOne A]",
"[AddZeroClass ι] [GMul A]",
"{A}",
"[AddMonoid ι] [GMonoid A]",
"{A} in",
"[AddCommMonoid ι] [GCo... | [
{
"line": "match l with\n| [] =>\n rw [List.map_nil]\n rw [List.map_nil]\n rw [List.prod_nil]\n rw [List.sum_nil]\n exact one_mem_graded _\n| head :: tail =>\n rw [List.map_cons]\n rw [List.map_cons]\n rw [List.prod_cons]\n rw [List.sum_cons]\n exact\n mul_mem_graded (h _ List.mem_cons_self)\n ... |
theorem list_prod_ofFn_mem_graded {n} (i : Fin n → ι) (r : Fin n → R) (h : ∀ j, r j ∈ A (i j)) :
(List.ofFn r).prod ∈ A (List.ofFn i).sum := by
rw [List.ofFn_eq_map]
rw [List.ofFn_eq_map]
exact list_prod_map_mem_graded _ _ _ fun _ _ => h _
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GradedMonoid.lean | {
"open": [],
"variables": [
"{ι : Type*}",
"{α β} {A : ι → Type*}",
"(A : ι → Type*)",
"{A}",
"[AddMonoid ι] [GMul A] [GOne A]",
"(A : ι → Type*)",
"[Zero ι] [GOne A]",
"[AddZeroClass ι] [GMul A]",
"{A}",
"[AddMonoid ι] [GMonoid A]",
"{A} in",
"[AddCommMonoid ι] [GCo... | [
{
"line": "rw [List.ofFn_eq_map]",
"before_state": "ι : Type u_1\ninst✝⁴ : AddMonoid ι\nR : Type u_8\nS : Type u_9\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : SetLike.GradedMonoid A\nn : ℕ\ni : Fin n → ι\nr : Fin n → R\nh : ∀ (j : Fin n), r j ∈ A (i j)\n⊢ (List.ofFn r)... |
theorem prod_mem_graded (hF : ∀ k ∈ F, g k ∈ A (i k)) : ∏ k ∈ F, g k ∈ A (∑ k ∈ F, i k) := by
classical
induction F using Finset.induction_on
· simp [GradedOne.one_mem]
· case insert j F' hF2 h3 =>
rw [Finset.prod_insert hF2]
rw [Finset.sum_insert hF2]
apply SetLike.mul_mem_graded (hF j <| Finset.me... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GradedMonoid.lean | {
"open": [
"SetLike SetLike.GradedMonoid"
],
"variables": [
"{ι : Type*}",
"{α β} {A : ι → Type*}",
"(A : ι → Type*)",
"{A}",
"[AddMonoid ι] [GMul A] [GOne A]",
"(A : ι → Type*)",
"[Zero ι] [GOne A]",
"[AddZeroClass ι] [GMul A]",
"{A}",
"[AddMonoid ι] [GMonoid A]",
... | [
{
"line": "classical\ninduction F using Finset.induction_on\n· simp [GradedOne.one_mem]\n·\n case insert j F' hF2 h3 =>\n rw [Finset.prod_insert hF2]\n rw [Finset.sum_insert hF2]\n apply SetLike.mul_mem_graded (hF j <| Finset.mem_insert_self j F')\n apply h3\n intro k hk\n apply hF k\n exa... |
theorem sol_eq_of_eq_init (u v : ℕ → R) (hu : E.IsSolution u) (hv : E.IsSolution v) :
u = v ↔ Set.EqOn u v ↑(range E.order) := by
refine Iff.intro (fun h x _ ↦ h ▸ rfl) ?_
intro h
set u' : ↥E.solSpace := ⟨u, hu⟩
set v' : ↥E.solSpace := ⟨v, hv⟩
change u'.val = v'.val
suffices h' : u' = v' from h' ▸ rfl
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/LinearRecurrence.lean | {
"open": [
"Finset",
"Polynomial"
],
"variables": [
"{R : Type*} [CommSemiring R] (E : LinearRecurrence R)"
]
} | [
{
"line": "refine Iff.intro (fun h x _ ↦ h ▸ rfl) ?_",
"before_state": "R : Type u_1\ninst✝ : CommSemiring R\nE : LinearRecurrence R\nu v : ℕ → R\nhu : E.IsSolution u\nhv : E.IsSolution v\n⊢ u = v ↔ Set.EqOn u v ↑(range E.order)",
"after_state": "R : Type u_1\ninst✝ : CommSemiring R\nE : LinearRecurrenc... |
theorem modEq_refl (a : α) : a ≡ a [PMOD p] :=
⟨0, by simp⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a : α\n⊢ a - a = 0 • p",
"after_state": "No Goals!"
}
] |
theorem ModEq.trans : a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p] := fun ⟨m, hm⟩ ⟨n, hn⟩ =>
⟨m + n, by simp [add_smul, ← hm, ← hn]⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [add_smul, ← hm, ← hn]",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a b c : α\nx✝¹ : a ≡ b [PMOD p]\nx✝ : b ≡ c [PMOD p]\nm : ℤ\nhm : b - a = m • p\nn : ℤ\nhn : c - b = n • p\n⊢ c - a = (m + n) • p",
"after_state": "No Goals!"
}
] |
theorem modEq_zero : a ≡ b [PMOD 0] ↔ a = b := by simp [ModEq, sub_eq_zero, eq_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [ModEq, sub_eq_zero, eq_comm]",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\na b : α\n⊢ a ≡ b [PMOD 0] ↔ a = b",
"after_state": "No Goals!"
}
] |
theorem self_modEq_zero : p ≡ 0 [PMOD p] :=
⟨-1, by simp⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np : α\n⊢ 0 - p = -1 • p",
"after_state": "No Goals!"
}
] |
theorem zsmul_modEq_zero (z : ℤ) : z • p ≡ 0 [PMOD p] :=
⟨-z, by simp⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np : α\nz : ℤ\n⊢ 0 - z • p = -z • p",
"after_state": "No Goals!"
}
] |
theorem add_zsmul_modEq (z : ℤ) : a + z • p ≡ a [PMOD p] :=
⟨-z, by simp⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a : α\nz : ℤ\n⊢ a - (a + z • p) = -z • p",
"after_state": "No Goals!"
}
] |
theorem zsmul_add_modEq (z : ℤ) : z • p + a ≡ a [PMOD p] :=
⟨-z, by simp [← sub_sub]⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [← sub_sub]",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a : α\nz : ℤ\n⊢ a - (z • p + a) = -z • p",
"after_state": "No Goals!"
}
] |
theorem add_nsmul_modEq (n : ℕ) : a + n • p ≡ a [PMOD p] :=
⟨-n, by simp⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a : α\nn : ℕ\n⊢ a - (a + n • p) = -↑n • p",
"after_state": "No Goals!"
}
] |
theorem nsmul_add_modEq (n : ℕ) : n • p + a ≡ a [PMOD p] :=
⟨-n, by simp [← sub_sub]⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [← sub_sub]",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a : α\nn : ℕ\n⊢ a - (n • p + a) = -↑n • p",
"after_state": "No Goals!"
}
] |
theorem zsmul_modEq_zsmul [NoZeroSMulDivisors ℤ α] (hn : z ≠ 0) :
z • a ≡ z • b [PMOD z • p] ↔ a ≡ b [PMOD p] :=
exists_congr fun m => by rw [← smul_sub, smul_comm, smul_right_inj hn]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "rw [← smul_sub, smul_comm, smul_right_inj hn]",
"before_state": "α : Type u_1\ninst✝¹ : AddCommGroup α\np a b : α\nz : ℤ\ninst✝ : NoZeroSMulDivisors ℤ α\nhn : z ≠ 0\nm : ℤ\n⊢ z • b - z • a = m • z • p ↔ b - a = m • p",
"after_state": "No Goals!"
},
{
"line": "rewrite [← smul_sub, smul... |
theorem nsmul_modEq_nsmul [NoZeroSMulDivisors ℕ α] (hn : n ≠ 0) :
n • a ≡ n • b [PMOD n • p] ↔ a ≡ b [PMOD p] :=
exists_congr fun m => by rw [← smul_sub, smul_comm, smul_right_inj hn]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "rw [← smul_sub, smul_comm, smul_right_inj hn]",
"before_state": "α : Type u_1\ninst✝¹ : AddCommGroup α\np a b : α\nn : ℕ\ninst✝ : NoZeroSMulDivisors ℕ α\nhn : n ≠ 0\nm : ℤ\n⊢ n • b - n • a = m • n • p ↔ b - a = m • p",
"after_state": "No Goals!"
},
{
"line": "rewrite [← smul_sub, smul... |
theorem sub_modEq_zero : a - b ≡ 0 [PMOD p] ↔ a ≡ b [PMOD p] := by simp [sub_modEq_iff_modEq_add]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [sub_modEq_iff_modEq_add]",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a b : α\n⊢ a - b ≡ 0 [PMOD p] ↔ a ≡ b [PMOD p]",
"after_state": "No Goals!"
}
] |
theorem add_modEq_left : a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p] := by simp [← modEq_sub_iff_add_modEq']
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [← modEq_sub_iff_add_modEq']",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a b : α\n⊢ a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p]",
"after_state": "No Goals!"
}
] |
theorem add_modEq_right : a + b ≡ b [PMOD p] ↔ a ≡ 0 [PMOD p] := by simp [← modEq_sub_iff_add_modEq]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [← modEq_sub_iff_add_modEq]",
"before_state": "α : Type u_1\ninst✝ : AddCommGroup α\np a b : α\n⊢ a + b ≡ b [PMOD p] ↔ a ≡ 0 [PMOD p]",
"after_state": "No Goals!"
}
] |
theorem modEq_iff_int_modEq {a b z : ℤ} : a ≡ b [PMOD z] ↔ a ≡ b [ZMOD z] := by
simp [ModEq, dvd_iff_exists_eq_mul_left, Int.modEq_iff_dvd]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}"
]
} | [
{
"line": "simp [ModEq, dvd_iff_exists_eq_mul_left, Int.modEq_iff_dvd]",
"before_state": "a b z : ℤ\n⊢ a ≡ b [PMOD z] ↔ a ≡ b [ZMOD z]",
"after_state": "No Goals!"
}
] |
lemma intCast_modEq_intCast' {a b : ℤ} {n : ℕ} : a ≡ b [PMOD (n : α)] ↔ a ≡ b [PMOD (n : ℤ)] := by
simpa using intCast_modEq_intCast (α := α) (z := n)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/ModEq.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}",
"[AddCommGroupWithOne α] [CharZero α]"
]
} | [
{
"line": "simpa using intCast_modEq_intCast (α := α) (z := n)",
"before_state": "α : Type u_1\ninst✝² : AddCommGroup α\ninst✝¹ : AddCommGroupWithOne α\ninst✝ : CharZero α\na b : ℤ\nn : ℕ\n⊢ ↑a ≡ ↑b [PMOD ↑n] ↔ a ≡ b [PMOD ↑n]",
"after_state": "No Goals!"
}
] |
theorem left_cancel (x : R) {y y' : R} : x ◃ y = x ◃ y' ↔ y = y' := by
constructor
· apply (act' x).injective
rintro rfl
rfl
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quandle.lean | {
"open": [
"MulOpposite",
"Quandles",
"Shelf"
],
"variables": [
"{S : Type*} [UnitalShelf S]",
"{R : Type*} [Rack R]"
]
} | [
{
"line": "constructor",
"before_state": "R : Type u_2\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃ y = x ◃ y' ↔ y = y'",
"after_state": "case mp\nR : Type u_2\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃ y = x ◃ y' → y = y'\n---\ncase mpr\nR : Type u_2\ninst✝ : Rack R\nx y y' : R\n⊢ y = y' → x ◃ y = x ◃ y'"
},
{
"... |
theorem left_cancel_inv (x : R) {y y' : R} : x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y' := by
constructor
· apply (act' x).symm.injective
rintro rfl
rfl
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quandle.lean | {
"open": [
"MulOpposite",
"Quandles",
"Shelf"
],
"variables": [
"{S : Type*} [UnitalShelf S]",
"{R : Type*} [Rack R]"
]
} | [
{
"line": "constructor",
"before_state": "R : Type u_2\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y'",
"after_state": "case mp\nR : Type u_2\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃⁻¹ y = x ◃⁻¹ y' → y = y'\n---\ncase mpr\nR : Type u_2\ninst✝ : Rack R\nx y y' : R\n⊢ y = y' → x ◃⁻¹ y = x ◃⁻¹ y'"
... |
theorem fix_inv {x : Q} : x ◃⁻¹ x = x := by
rw [← left_cancel x]
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quandle.lean | {
"open": [
"MulOpposite",
"Quandles",
"Shelf",
"Rack"
],
"variables": [
"{S : Type*} [UnitalShelf S]",
"{R : Type*} [Rack R]",
"{S₁ : Type*} {S₂ : Type*} {S₃ : Type*} [Shelf S₁] [Shelf S₂] [Shelf S₃]",
"{Q : Type*} [Quandle Q]"
]
} | [
{
"line": "rw [← left_cancel x]",
"before_state": "Q : Type u_6\ninst✝ : Quandle Q\nx : Q\n⊢ x ◃⁻¹ x = x",
"after_state": "Q : Type u_6\ninst✝ : Quandle Q\nx : Q\n⊢ x ◃ x ◃⁻¹ x = x ◃ x"
},
{
"line": "rewrite [← left_cancel x]",
"before_state": "Q : Type u_6\ninst✝ : Quandle Q\nx : Q\n⊢ x ◃⁻¹... |
theorem well_def {R : Type*} [Rack R] {G : Type*} [Group G] (f : R →◃ Quandle.Conj G) :
∀ {a b : PreEnvelGroup R},
PreEnvelGroupRel' R a b → toEnvelGroup.mapAux f a = toEnvelGroup.mapAux f b
| _, _, PreEnvelGroupRel'.refl => rfl
| _, _, PreEnvelGroupRel'.symm h => (well_def f h).symm
| _, _, PreEnvelGro... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quandle.lean | {
"open": [
"MulOpposite",
"Quandles",
"Shelf",
"Rack",
"PreEnvelGroup",
"PreEnvelGroupRel'"
],
"variables": [
"{S : Type*} [UnitalShelf S]",
"{R : Type*} [Rack R]",
"{S₁ : Type*} {S₂ : Type*} {S₃ : Type*} [Shelf S₁] [Shelf S₂] [Shelf S₃]",
"{Q : Type*} [Quandle Q]"
]
} | [
{
"line": "simp [toEnvelGroup.mapAux, well_def f ha, well_def f hb]",
"before_state": "R : Type u_7\ninst✝¹ : Rack R\nG : Type u_8\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na✝ b✝ a'✝ b'✝ : PreEnvelGroup R\nha : PreEnvelGroupRel' R a✝ a'✝\nhb : PreEnvelGroupRel' R b✝ b'✝\n⊢ toEnvelGroup.mapAux f (a✝.mul b✝)... |
theorem mul_re : (a * b).re = a.re * b.re - a.imI * b.imI - a.imJ * b.imJ - a.imK * b.imK :=
(QuaternionAlgebra.mul_re a b).trans <| by simp [one_mul, neg_mul, sub_eq_add_neg, neg_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [SMul T R] (s : S)",
... | [
{
"line": "simp [one_mul, neg_mul, sub_eq_add_neg, neg_neg]",
"before_state": "R : Type u_6\ninst✝ : CommRing R\na b : ℍ[R]\n⊢ a.re * b.re + -1 * a.imI * b.imI + -1 * a.imJ * b.imJ + 0 * -1 * a.imJ * b.imK - -1 * -1 * a.imK * b.imK =\n a.re * b.re - a.imI * b.imI - a.imJ * b.imJ - a.imK * b.imK",
"af... |
theorem mul_imI : (a * b).imI = a.re * b.imI + a.imI * b.re + a.imJ * b.imK - a.imK * b.imJ :=
(QuaternionAlgebra.mul_imI a b).trans <| by ring
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [SMul T R] (s : S)",
... | [
{
"line": "ring",
"before_state": "R : Type u_6\ninst✝ : CommRing R\na b : ℍ[R]\n⊢ a.re * b.imI + a.imI * b.re + 0 * a.imI * b.imI - -1 * a.imJ * b.imK + -1 * a.imK * b.imJ =\n a.re * b.imI + a.imI * b.re + a.imJ * b.imK - a.imK * b.imJ",
"after_state": "No Goals!"
},
{
"line": "first\n| ring... |
theorem mul_imJ : (a * b).imJ = a.re * b.imJ - a.imI * b.imK + a.imJ * b.re + a.imK * b.imI :=
(QuaternionAlgebra.mul_imJ a b).trans <| by ring
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [SMul T R] (s : S)",
... | [
{
"line": "ring",
"before_state": "R : Type u_6\ninst✝ : CommRing R\na b : ℍ[R]\n⊢ a.re * b.imJ + -1 * a.imI * b.imK + a.imJ * b.re + 0 * a.imJ * b.imI - -1 * a.imK * b.imI =\n a.re * b.imJ - a.imI * b.imK + a.imJ * b.re + a.imK * b.imI",
"after_state": "No Goals!"
},
{
"line": "first\n| ring... |
theorem mul_imK : (a * b).imK = a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re :=
(QuaternionAlgebra.mul_imK a b).trans <| by ring
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [SMul T R] (s : S)",
... | [
{
"line": "ring",
"before_state": "R : Type u_6\ninst✝ : CommRing R\na b : ℍ[R]\n⊢ a.re * b.imK + a.imI * b.imJ + 0 * a.imI * b.imK - a.imJ * b.imI + a.imK * b.re =\n a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re",
"after_state": "No Goals!"
},
{
"line": "first\n| ring1\n|\n tr... |
theorem im_star : star a.im = -a.im := by ext <;> simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [SMul T R] (s : S)",
... | [
{
"line": "focus\n ext\n with_annotate_state\"<;>\" skip\n all_goals simp",
"before_state": "R : Type u_6\ninst✝ : CommRing R\na : ℍ[R]\n⊢ star a.im = -a.im",
"after_state": "No Goals!"
},
{
"line": "ext",
"before_state": "R : Type u_6\ninst✝ : CommRing R\na : ℍ[R]\n⊢ star a.im = -a.im",
... |
theorem normSq_coe : normSq (x : ℍ[R]) = x ^ 2 := by
rw [normSq_def]
rw [star_coe]
rw [← coe_mul]
rw [coe_re]
rw [sq]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [normSq_def]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\nx : R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ normSq ↑x = x ^ 2",
"after_state": "R : Type u_6\ninst✝² : CommRing R\nx : R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ (↑x * star ↑x).re = x ^ 2"
},
{
... |
theorem normSq_star : normSq (star a) = normSq a := by simp [normSq_def']
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "simp [normSq_def']",
"before_state": "R : Type u_6\ninst✝² : CommRing R\na : ℍ[R]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ normSq (star a) = normSq a",
"after_state": "No Goals!"
}
] |
theorem normSq_natCast (n : ℕ) : normSq (n : ℍ[R]) = (n : R) ^ 2 := by
rw [← coe_natCast]
rw [normSq_coe]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [← coe_natCast]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\nn : ℕ\n⊢ normSq ↑n = ↑n ^ 2",
"after_state": "R : Type u_6\ninst✝² : CommRing R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\nn : ℕ\n⊢ normSq ↑↑n = ↑n ^ 2"
},
{
"l... |
theorem normSq_intCast (z : ℤ) : normSq (z : ℍ[R]) = (z : R) ^ 2 := by
rw [← coe_intCast]
rw [normSq_coe]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [← coe_intCast]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\nz : ℤ\n⊢ normSq ↑z = ↑z ^ 2",
"after_state": "R : Type u_6\ninst✝² : CommRing R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\nz : ℤ\n⊢ normSq ↑↑z = ↑z ^ 2"
},
{
"l... |
theorem normSq_neg : normSq (-a) = normSq a := by simp only [normSq_def, star_neg, neg_mul_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "simp only [normSq_def, star_neg, neg_mul_neg]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\na : ℍ[R]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ normSq (-a) = normSq a",
"after_state": "No Goals!"
}
] |
theorem self_mul_star : a * star a = normSq a := by rw [mul_star_eq_coe, normSq_def]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [mul_star_eq_coe, normSq_def]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\na : ℍ[R]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ a * star a = ↑(normSq a)",
"after_state": "No Goals!"
},
{
"line": "rewrite [mul_star_eq_coe, normSq_def]",
"before_state": "R : Type u... |
theorem star_mul_self : star a * a = normSq a := by rw [star_comm_self, self_mul_star]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [star_comm_self, self_mul_star]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\na : ℍ[R]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ star a * a = ↑(normSq a)",
"after_state": "No Goals!"
},
{
"line": "rewrite [star_comm_self, self_mul_star]",
"before_state": "R : Ty... |
theorem im_sq : a.im ^ 2 = -normSq a.im := by
simp_rw [sq, ← star_mul_self, im_star, neg_mul, neg_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "simp_rw [sq, ← star_mul_self, im_star, neg_mul, neg_neg]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\na : ℍ[R]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\n⊢ a.im ^ 2 = -↑(normSq a.im)",
"after_state": "No Goals!"
},
{
"line": "simp (failIfUnchanged✝ := false✝) only",
... |
theorem normSq_add (a b : ℍ[R]) : normSq (a + b) = normSq a + normSq b + 2 * (a * star b).re :=
calc
normSq (a + b) = normSq a + (a * star b).re + ((b * star a).re + normSq b) := by
simp_rw [normSq_def, star_add, add_mul, mul_add, add_re]
_ = normSq a + normSq b + ((a * star b).re + (b * star a).re) := ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "simp_rw [normSq_def, star_add, add_mul, mul_add, add_re]",
"before_state": "R : Type u_6\ninst✝² : CommRing R\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\na b : ℍ[R]\n⊢ normSq (a + b) = normSq a + (a * star b).re + ((b * star a).re + normSq b)",
"after_state": "No Goals!"
},
{
"lin... |
theorem normSq_nonneg : 0 ≤ normSq a := by
rw [normSq_def']
apply_rules [sq_nonneg, add_nonneg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [normSq_def']",
"before_state": "R : Type u_7\ninst✝² : CommRing R\ninst✝¹ : LinearOrder R\ninst✝ : IsStrictOrderedRing R\na : ℍ[R]\n⊢ 0 ≤ normSq a",
"after_state": "R : Type u_7\ninst✝² : CommRing R\ninst✝¹ : LinearOrder R\ninst✝ : IsStrictOrderedRing R\na : ℍ[R]\n⊢ 0 ≤ a.re ^ 2 + a.imI ^... |
theorem sq_eq_normSq : a ^ 2 = normSq a ↔ a = a.re := by
rw [← star_eq_self]
rw [← star_mul_self]
rw [sq]
rw [mul_eq_mul_right_iff]
rw [eq_comm]
exact or_iff_left_of_imp fun ha ↦ ha.symm ▸ star_zero _
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "rw [← star_eq_self]",
"before_state": "R : Type u_7\ninst✝² : CommRing R\ninst✝¹ : LinearOrder R\ninst✝ : IsStrictOrderedRing R\na : ℍ[R]\n⊢ a ^ 2 = ↑(normSq a) ↔ a = ↑a.re",
"after_state": "R : Type u_7\ninst✝² : CommRing R\ninst✝¹ : LinearOrder R\ninst✝ : IsStrictOrderedRing R\na : ℍ[R]\n⊢ ... |
theorem sq_eq_neg_normSq : a ^ 2 = -normSq a ↔ a.re = 0 := by
simp_rw [← star_eq_neg]
obtain rfl | hq0 := eq_or_ne a 0
· simp
· rw [← star_mul_self, ← mul_neg, ← neg_sq, sq, mul_left_inj' (neg_ne_zero.mpr hq0), eq_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Quaternion.lean | {
"open": [
"Quaternion",
"MulOpposite",
"Quaternion",
"MulOpposite"
],
"variables": [
"{S T R : Type*} {c₁ c₂ c₃ : R} (r x y : R) (a b : ℍ[R,c₁,c₂,c₃])",
"[Zero R]",
"[One R]",
"[Add R]",
"[AddZeroClass R]",
"[Neg R]",
"[AddGroup R]",
"[Ring R]",
"[SMul S R] [S... | [
{
"line": "simp_rw [← star_eq_neg]",
"before_state": "R : Type u_7\ninst✝² : CommRing R\ninst✝¹ : LinearOrder R\ninst✝ : IsStrictOrderedRing R\na : ℍ[R]\n⊢ a ^ 2 = -↑(normSq a) ↔ a.re = 0",
"after_state": "R : Type u_7\ninst✝² : CommRing R\ninst✝¹ : LinearOrder R\ninst✝ : IsStrictOrderedRing R\na : ℍ[R]... |
theorem lift_apply_inl (f : R →ₐ[S] A) (g : M →ₗ[S] A)
(hg : ∀ x y, g x * g y = 0)
(hfg : ∀ r x, g (r •> x) = f r * g x)
(hgf : ∀ r x, g (x <• r) = g x * f r)
(r : R) :
lift f g hg hfg hgf (inl r) = f r :=
show f r + g 0 = f r by rw [map_zero, add_zero]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/TrivSqZeroExt.lean | {
"open": [
"scoped RightActions",
"MulOpposite"
],
"variables": [
"{R : Type u} {M : Type v}",
"(M)",
"(R)",
"{T : Type*} {S : Type*} {R : Type u} {M : Type v}",
"(M)",
"(R)",
"(R M)",
"{R : Type u} {M : Type v}",
"(M)",
"(R)",
"(R M)",
"{R : Type u} {M : T... | [
{
"line": "rw [map_zero, add_zero]",
"before_state": "S : Type u_3\nR : Type u\nM : Type v\ninst✝¹¹ : CommSemiring S\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Algebra S R\ninst✝⁷ : Module S M\ninst✝⁶ : Module R M\ninst✝⁵ : Module Rᵐᵒᵖ M\ninst✝⁴ : SMulCommClass R Rᵐᵒᵖ M\ninst✝³ : IsScalarTowe... |
theorem lift_apply_inr (f : R →ₐ[S] A) (g : M →ₗ[S] A)
(hg : ∀ x y, g x * g y = 0)
(hfg : ∀ r x, g (r •> x) = f r * g x)
(hgf : ∀ r x, g (x <• r) = g x * f r)
(m : M) :
lift f g hg hfg hgf (inr m) = g m :=
show f 0 + g m = g m by rw [map_zero, zero_add]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/TrivSqZeroExt.lean | {
"open": [
"scoped RightActions",
"MulOpposite"
],
"variables": [
"{R : Type u} {M : Type v}",
"(M)",
"(R)",
"{T : Type*} {S : Type*} {R : Type u} {M : Type v}",
"(M)",
"(R)",
"(R M)",
"{R : Type u} {M : Type v}",
"(M)",
"(R)",
"(R M)",
"{R : Type u} {M : T... | [
{
"line": "rw [map_zero, zero_add]",
"before_state": "S : Type u_3\nR : Type u\nM : Type v\ninst✝¹¹ : CommSemiring S\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Algebra S R\ninst✝⁷ : Module S M\ninst✝⁶ : Module R M\ninst✝⁵ : Module Rᵐᵒᵖ M\ninst✝⁴ : SMulCommClass R Rᵐᵒᵖ M\ninst✝³ : IsScalarTowe... |
theorem map_add_nsmul [AddMonoid G] [AddMonoid H] [AddConstMapClass F G H a b]
(f : F) (x : G) (n : ℕ) : f (x + n • a) = f x + n • b := by
simpa using (AddConstMapClass.semiconj f).iterate_right n x
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using (AddConstMapClass.semiconj f).iterate_right n x",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\na : G\nb : H\ninst✝² : AddMonoid G\ninst✝¹ : AddMonoid H\ninst✝ : AddConstMapClass F G H a b\nf : F\nx : G\nn : ℕ\n⊢ f (x + n • a) = f x + n • b",
"... |
theorem map_const [AddZeroClass G] [Add H] [AddConstMapClass F G H a b] (f : F) :
f a = f 0 + b := by
simpa using map_add_const f 0
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_add_const f 0",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\na : G\nb : H\ninst✝² : AddZeroClass G\ninst✝¹ : Add H\ninst✝ : AddConstMapClass F G H a b\nf : F\n⊢ f a = f 0 + b",
"after_state": "No Goals!"
}
] |
theorem map_nsmul_const [AddMonoid G] [AddMonoid H] [AddConstMapClass F G H a b]
(f : F) (n : ℕ) : f (n • a) = f 0 + n • b := by
simpa using map_add_nsmul f 0 n
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_add_nsmul f 0 n",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\na : G\nb : H\ninst✝² : AddMonoid G\ninst✝¹ : AddMonoid H\ninst✝ : AddConstMapClass F G H a b\nf : F\nn : ℕ\n⊢ f (n • a) = f 0 + n • b",
"after_state": "No Goals!"
}
] |
theorem map_nat' [AddMonoidWithOne G] [AddMonoid H] [AddConstMapClass F G H 1 b]
(f : F) (n : ℕ) : f n = f 0 + n • b := by
simpa using map_add_nat' f 0 n
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_add_nat' f 0 n",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\nb : H\ninst✝² : AddMonoidWithOne G\ninst✝¹ : AddMonoid H\ninst✝ : AddConstMapClass F G H 1 b\nf : F\nn : ℕ\n⊢ f ↑n = f 0 + n • b",
"after_state": "No Goals!"
}
] |
theorem map_nat_add' [AddCommMonoidWithOne G] [AddMonoid H] [AddConstMapClass F G H 1 b]
(f : F) (n : ℕ) (x : G) : f (↑n + x) = f x + n • b := by
simpa using map_nsmul_add f n x
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_nsmul_add f n x",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\nb : H\ninst✝² : AddCommMonoidWithOne G\ninst✝¹ : AddMonoid H\ninst✝ : AddConstMapClass F G H 1 b\nf : F\nn : ℕ\nx : G\n⊢ f (↑n + x) = f x + n • b",
"after_state": "No Goals!"
... |
theorem map_sub_const [AddGroup G] [AddGroup H] [AddConstMapClass F G H a b]
(f : F) (x : G) : f (x - a) = f x - b := by
simpa using map_sub_nsmul f x 1
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_sub_nsmul f x 1",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\na : G\nb : H\ninst✝² : AddGroup G\ninst✝¹ : AddGroup H\ninst✝ : AddConstMapClass F G H a b\nf : F\nx : G\n⊢ f (x - a) = f x - b",
"after_state": "No Goals!"
}
] |
theorem map_sub_nat' [AddGroupWithOne G] [AddGroup H] [AddConstMapClass F G H 1 b]
(f : F) (x : G) (n : ℕ) : f (x - n) = f x - n • b := by
simpa using map_sub_nsmul f x n
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_sub_nsmul f x n",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\nb : H\ninst✝² : AddGroupWithOne G\ninst✝¹ : AddGroup H\ninst✝ : AddConstMapClass F G H 1 b\nf : F\nx : G\nn : ℕ\n⊢ f (x - ↑n) = f x - n • b",
"after_state": "No Goals!"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.