1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Fermat42.neg_of_minimal
File: Mathlib/NumberTheory/FLT/Four.lean

tactic: rintro ⟨⟨ha, hb, heq⟩, h2⟩
state_before: a b c : ℤ
⊢ Minimal a b c → Minimal a b (-c)
state_after: case intro.intro.intro
a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ Minimal a b (-c)

tactic: constructor
state_before: case intro.intro.intro
a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ Minimal a b (-c)
state_after: case intro.intro.intro.left
a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ Fermat42 a b (-c)

case intro.intro.intro.right
a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → (-c).natAbs ≤ c1.natAbs

tactic: rwa [Int.natAbs_neg c]
state_before: case intro.intro.intro.right
a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → (-c).natAbs ≤ c1.natAbs
state_after: no goals

tactic: apply And.intro ha (And.intro hb _)
state_before: case intro.intro.intro.left
a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ Fermat42 a b (-c)
state_after: a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ a ^ 4 + b ^ 4 = (-c) ^ 2

tactic: rw [heq]
state_before: a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ a ^ 4 + b ^ 4 = (-c) ^ 2
state_after: a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ c ^ 2 = (-c) ^ 2

tactic: exact (neg_sq c).symm
state_before: a b c : ℤ
h2 : ∀ (a1 b1 c1 : ℤ), Fermat42 a1 b1 c1 → c.natAbs ≤ c1.natAbs
ha : a ≠ 0
hb : b ≠ 0
heq : a ^ 4 + b ^ 4 = c ^ 2
⊢ c ^ 2 = (-c) ^ 2
state_after: no goals
Theorem: Multiset.erase_attach_map
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp only [← Function.comp_apply (f := f)]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ s : Multiset α
f : α → β
x : { x // x ∈ s }
⊢ map (fun j => f ↑j) (s.attach.erase x) = map f (s.erase ↑x)
state_after: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ s : Multiset α
f : α → β
x : { x // x ∈ s }
⊢ map (fun x => (f ∘ val) x) (s.attach.erase x) = map f (s.erase ↑x)

tactic: rw [← map_map, erase_attach_map_val]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ s : Multiset α
f : α → β
x : { x // x ∈ s }
⊢ map (fun x => (f ∘ val) x) (s.attach.erase x) = map f (s.erase ↑x)
state_after: no goals
Theorem: Multiset.strongDownwardInduction_eq
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [strongDownwardInduction]
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : Multiset α → Sort u_3
n : ℕ
H : (t₁ : Multiset α) → ({t₂ : Multiset α} → card t₂ ≤ n → t₁ < t₂ → p t₂) → card t₁ ≤ n → p t₁
s : Multiset α
⊢ strongDownwardInduction H s = H s fun {t₂} ht _hst => strongDownwardInduction H t₂ ht
state_after: no goals
Theorem: Filter.eventually_cardinal_ball
File: Mathlib/Order/Filter/CardinalInter.lean

tactic: simp only [Filter.Eventually, setOf_forall]
state_before: ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
S : Set ι
hS : #↑S < c
p : α → (i : ι) → i ∈ S → Prop
⊢ (∀ᶠ (x : α) in l, ∀ (i : ι) (hi : i ∈ S), p x i hi) ↔ ∀ (i : ι) (hi : i ∈ S), ∀ᶠ (x : α) in l, p x i hi
state_after: ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
S : Set ι
hS : #↑S < c
p : α → (i : ι) → i ∈ S → Prop
⊢ ⋂ i, ⋂ (i_1 : i ∈ S), {x | p x i i_1} ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), {x | p x i hi} ∈ l

tactic: exact cardinal_bInter_mem hS
state_before: ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
S : Set ι
hS : #↑S < c
p : α → (i : ι) → i ∈ S → Prop
⊢ ⋂ i, ⋂ (i_1 : i ∈ S), {x | p x i i_1} ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), {x | p x i hi} ∈ l
state_after: no goals
Theorem: Disjoint.sup_sdiff_cancel_right
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sup_sdiff, sdiff_self, sup_bot_eq, h.sdiff_eq_left]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
h : Disjoint a b
⊢ (a ⊔ b) \ b = a
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.comp_smul
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

tactic: ext p q hpq
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₁ : Cochain F G n₁
k : R
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
⊢ z₁.comp (k • z₂) h = k • z₁.comp z₂ h
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₁ : Cochain F G n₁
k : R
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
p q : ℤ
hpq : p + n₁₂ = q
⊢ (z₁.comp (k • z₂) h).v p q hpq = (k • z₁.comp z₂ h).v p q hpq

tactic: simp only [comp_v _ _ h p _ q rfl (by omega), smul_v, Linear.comp_smul]
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₁ : Cochain F G n₁
k : R
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
p q : ℤ
hpq : p + n₁₂ = q
⊢ (z₁.comp (k • z₂) h).v p q hpq = (k • z₁.comp z₂ h).v p q hpq
state_after: no goals

tactic: omega
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₁ : Cochain F G n₁
k : R
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
p q : ℤ
hpq : p + n₁₂ = q
⊢ p + n₁ + n₂ = q
state_after: no goals
Theorem: Option.liftOrGet_choice
File: Mathlib/Data/Option/Basic.lean

tactic: simpa [liftOrGet] using h a b
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
f : α → α → α
h : ∀ (a b : α), f a b = a ∨ f a b = b
a b : α
⊢ liftOrGet f (some a) (some b) = some a ∨ liftOrGet f (some a) (some b) = some b
state_after: no goals
Theorem: Filter.map_inf_principal_preimage
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [mem_map', mem_inf_principal, mem_setOf_eq, mem_preimage]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l✝ : Filter α
f : α → β
s : Set β
l : Filter α
t : Set β
⊢ t ∈ map f (l ⊓ 𝓟 (f ⁻¹' s)) ↔ t ∈ map f l ⊓ 𝓟 s
state_after: no goals
Theorem: IsPreconnected.eqOn_const_of_mapsTo
File: Mathlib/Topology/Connected/TotallyDisconnected.lean

tactic: rcases S.eq_empty_or_nonempty with (rfl | ⟨x, hx⟩)
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝³ : TopologicalSpace α
s t u v : Set α
inst✝² : TopologicalSpace β
inst✝¹ : TotallyDisconnectedSpace β
f✝ : α → β
S : Set α
hS : IsPreconnected S
T : Set β
inst✝ : DiscreteTopology ↑T
f : α → β
hc : ContinuousOn f S
hTm : MapsTo f S T
hne : T.Nonempty
⊢ ∃ y ∈ T, EqOn f (const α y) S
state_after: case inl
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝³ : TopologicalSpace α
s t u v : Set α
inst✝² : TopologicalSpace β
inst✝¹ : TotallyDisconnectedSpace β
f✝ : α → β
T : Set β
inst✝ : DiscreteTopology ↑T
f : α → β
hne : T.Nonempty
hS : IsPreconnected ∅
hc : ContinuousOn f ∅
hTm : MapsTo f ∅ T
⊢ ∃ y ∈ T, EqOn f (const α y) ∅

case inr.intro
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝³ : TopologicalSpace α
s t u v : Set α
inst✝² : TopologicalSpace β
inst✝¹ : TotallyDisconnectedSpace β
f✝ : α → β
S : Set α
hS : IsPreconnected S
T : Set β
inst✝ : DiscreteTopology ↑T
f : α → β
hc : ContinuousOn f S
hTm : MapsTo f S T
hne : T.Nonempty
x : α
hx : x ∈ S
⊢ ∃ y ∈ T, EqOn f (const α y) S

tactic: exact hne.imp fun _ hy => ⟨hy, eqOn_empty _ _⟩
state_before: case inl
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝³ : TopologicalSpace α
s t u v : Set α
inst✝² : TopologicalSpace β
inst✝¹ : TotallyDisconnectedSpace β
f✝ : α → β
T : Set β
inst✝ : DiscreteTopology ↑T
f : α → β
hne : T.Nonempty
hS : IsPreconnected ∅
hc : ContinuousOn f ∅
hTm : MapsTo f ∅ T
⊢ ∃ y ∈ T, EqOn f (const α y) ∅
state_after: no goals

tactic: exact ⟨f x, hTm hx, fun x' hx' => hS.constant_of_mapsTo hc hTm hx' hx⟩
state_before: case inr.intro
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝³ : TopologicalSpace α
s t u v : Set α
inst✝² : TopologicalSpace β
inst✝¹ : TotallyDisconnectedSpace β
f✝ : α → β
S : Set α
hS : IsPreconnected S
T : Set β
inst✝ : DiscreteTopology ↑T
f : α → β
hc : ContinuousOn f S
hTm : MapsTo f S T
hne : T.Nonempty
x : α
hx : x ∈ S
⊢ ∃ y ∈ T, EqOn f (const α y) S
state_after: no goals
Theorem: Nat.totient_mul_prod_primeFactors
File: Mathlib/Data/Nat/Totient.lean

tactic: by_cases hn : n = 0
state_before: n : ℕ
⊢ φ n * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)
state_after: case pos
n : ℕ
hn : n = 0
⊢ φ n * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)

case neg
n : ℕ
hn : ¬n = 0
⊢ φ n * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)

tactic: rw [totient_eq_prod_factorization hn]
state_before: case neg
n : ℕ
hn : ¬n = 0
⊢ φ n * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)
state_after: case neg
n : ℕ
hn : ¬n = 0
⊢ (n.factorization.prod fun p k => p ^ (k - 1) * (p - 1)) * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)

tactic: nth_rw 3 [← factorization_prod_pow_eq_self hn]
state_before: case neg
n : ℕ
hn : ¬n = 0
⊢ (n.factorization.prod fun p k => p ^ (k - 1) * (p - 1)) * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)
state_after: case neg
n : ℕ
hn : ¬n = 0
⊢ (n.factorization.prod fun p k => p ^ (k - 1) * (p - 1)) * ∏ p ∈ n.primeFactors, p =
    (n.factorization.prod fun x x_1 => x ^ x_1) * ∏ p ∈ n.primeFactors, (p - 1)

tactic: simp only [prod_primeFactors_prod_factorization, ← Finsupp.prod_mul]
state_before: case neg
n : ℕ
hn : ¬n = 0
⊢ (n.factorization.prod fun p k => p ^ (k - 1) * (p - 1)) * ∏ p ∈ n.primeFactors, p =
    (n.factorization.prod fun x x_1 => x ^ x_1) * ∏ p ∈ n.primeFactors, (p - 1)
state_after: case neg
n : ℕ
hn : ¬n = 0
⊢ (n.factorization.prod fun a b => a ^ (b - 1) * (a - 1) * a) = n.factorization.prod fun a b => a ^ b * (a - 1)

tactic: refine Finsupp.prod_congr (M := ℕ) (N := ℕ) fun p hp => ?_
state_before: case neg
n : ℕ
hn : ¬n = 0
⊢ (n.factorization.prod fun a b => a ^ (b - 1) * (a - 1) * a) = n.factorization.prod fun a b => a ^ b * (a - 1)
state_after: case neg
n : ℕ
hn : ¬n = 0
p : ℕ
hp : p ∈ n.factorization.support
⊢ p ^ (n.factorization p - 1) * (p - 1) * p = p ^ n.factorization p * (p - 1)

tactic: rw [Finsupp.mem_support_iff, ← zero_lt_iff] at hp
state_before: case neg
n : ℕ
hn : ¬n = 0
p : ℕ
hp : p ∈ n.factorization.support
⊢ p ^ (n.factorization p - 1) * (p - 1) * p = p ^ n.factorization p * (p - 1)
state_after: case neg
n : ℕ
hn : ¬n = 0
p : ℕ
hp : 0 < n.factorization p
⊢ p ^ (n.factorization p - 1) * (p - 1) * p = p ^ n.factorization p * (p - 1)

tactic: rw [mul_comm, ← mul_assoc, ← pow_succ', Nat.sub_one, Nat.succ_pred_eq_of_pos hp]
state_before: case neg
n : ℕ
hn : ¬n = 0
p : ℕ
hp : 0 < n.factorization p
⊢ p ^ (n.factorization p - 1) * (p - 1) * p = p ^ n.factorization p * (p - 1)
state_after: no goals

tactic: simp [hn]
state_before: case pos
n : ℕ
hn : n = 0
⊢ φ n * ∏ p ∈ n.primeFactors, p = n * ∏ p ∈ n.primeFactors, (p - 1)
state_after: no goals
Theorem: MeasureTheory.Measure.setLIntegral_condKernel
File: Mathlib/Probability/Kernel/Disintegration/Integral.lean

tactic: conv_rhs => rw [← compProd_fst_condKernel ρ]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
hf : Measurable f
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂ρ.condKernel b ∂ρ.fst = ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂ρ
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
hf : Measurable f
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂ρ.condKernel b ∂ρ.fst =
    ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂ρ.fst ⊗ₘ ρ.condKernel

tactic: rw [setLIntegral_compProd  hf hs ht]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
hf : Measurable f
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂ρ.condKernel b ∂ρ.fst =
    ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂ρ.fst ⊗ₘ ρ.condKernel
state_after: no goals
Theorem: Nat.choose_eq_factorial_div_factorial
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: rw [← choose_mul_factorial_mul_factorial hk, Nat.mul_assoc]
state_before: n k : ℕ
hk : k ≤ n
⊢ n.choose k = n ! / (k ! * (n - k)!)
state_after: n k : ℕ
hk : k ≤ n
⊢ n.choose k = n.choose k * (k ! * (n - k)!) / (k ! * (n - k)!)

tactic: exact (mul_div_left _ (Nat.mul_pos (factorial_pos _) (factorial_pos _))).symm
state_before: n k : ℕ
hk : k ≤ n
⊢ n.choose k = n.choose k * (k ! * (n - k)!) / (k ! * (n - k)!)
state_after: no goals
Theorem: round_add_one
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← round_add_int a 1, cast_one]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
a : α
⊢ round (a + 1) = round a + 1
state_after: no goals
Theorem: Module.rank_le_one_iff_top_isPrincipal
File: Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean

tactic: haveI := Module.Free.of_equiv (topEquiv (R := K) (M := V)).symm
state_before: K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : StrongRankCondition K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : Free K V
⊢ Module.rank K V ≤ 1 ↔ ⊤.IsPrincipal
state_after: K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : StrongRankCondition K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : Free K V
this : Free K ↥⊤
⊢ Module.rank K V ≤ 1 ↔ ⊤.IsPrincipal

tactic: rw [← Submodule.rank_le_one_iff_isPrincipal, rank_top]
state_before: K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : StrongRankCondition K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : Free K V
this : Free K ↥⊤
⊢ Module.rank K V ≤ 1 ↔ ⊤.IsPrincipal
state_after: no goals
Theorem: Padic.norm_lt_pow_iff_norm_le_pow_sub_one
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: rw [norm_le_pow_iff_norm_lt_pow_add_one, sub_add_cancel]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
n : ℤ
⊢ ‖x‖ < ↑p ^ n ↔ ‖x‖ ≤ ↑p ^ (n - 1)
state_after: no goals
Theorem: Polynomial.trailingDegree_eq_iff_natTrailingDegree_eq
File: Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean

tactic: rw [trailingDegree_eq_natTrailingDegree hp, Nat.cast_inj]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
hp : p ≠ 0
⊢ p.trailingDegree = ↑n ↔ p.natTrailingDegree = n
state_after: no goals
Theorem: SimpleGraph.not_isUniform_zero
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: simp
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : G.IsUniform 0 s t
⊢ ↑s.card * 0 ≤ ↑∅.card
state_after: no goals

tactic: simp
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : G.IsUniform 0 s t
⊢ ↑t.card * 0 ≤ ↑∅.card
state_after: no goals
Theorem: EReal.add_lt_add
File: Mathlib/Data/Real/EReal.lean

tactic: rcases eq_or_ne x ⊥ with (rfl | hx)
state_before: x y z t : EReal
h1 : x < y
h2 : z < t
⊢ x + z < y + t
state_after: case inl
y z t : EReal
h2 : z < t
h1 : ⊥ < y
⊢ ⊥ + z < y + t

case inr
x y z t : EReal
h1 : x < y
h2 : z < t
hx : x ≠ ⊥
⊢ x + z < y + t

tactic: simp [h1, bot_le.trans_lt h2]
state_before: case inl
y z t : EReal
h2 : z < t
h1 : ⊥ < y
⊢ ⊥ + z < y + t
state_after: no goals

tactic: lift x to ℝ using ⟨h1.ne_top, hx⟩
state_before: case inr
x y z t : EReal
h1 : x < y
h2 : z < t
hx : x ≠ ⊥
⊢ x + z < y + t
state_after: case inr.intro
y z t : EReal
h2 : z < t
x : ℝ
h1 : ↑x < y
hx : ↑x ≠ ⊥
⊢ ↑x + z < y + t

tactic: calc (x : EReal) + z < x + t := add_lt_add_left_coe h2 _
_ ≤ y + t := add_le_add_right h1.le _
state_before: case inr.intro
y z t : EReal
h2 : z < t
x : ℝ
h1 : ↑x < y
hx : ↑x ≠ ⊥
⊢ ↑x + z < y + t
state_after: no goals
Theorem: Pell.eq_pell
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: rw [zero_tsub] at hp
state_before: a : ℕ
a1 : 1 < a
x y : ℕ
hp✝ : x * x - Pell.d a1 * y * y = 1
hp : 0 - Pell.d a1 * y * y = 1
⊢ 1 ≤ { re := ↑0, im := ↑y }
state_after: a : ℕ
a1 : 1 < a
x y : ℕ
hp✝ : x * x - Pell.d a1 * y * y = 1
hp : 0 = 1
⊢ 1 ≤ { re := ↑0, im := ↑y }

tactic: contradiction
state_before: a : ℕ
a1 : 1 < a
x y : ℕ
hp✝ : x * x - Pell.d a1 * y * y = 1
hp : 0 = 1
⊢ 1 ≤ { re := ↑0, im := ↑y }
state_after: no goals
Theorem: Finpartition.mk_mem_nonUniforms
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: rw [nonUniforms, mem_filter, mem_offDiag, and_assoc, and_assoc]
state_before: α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε δ : 𝕜
u v : Finset α
⊢ (u, v) ∈ P.nonUniforms G ε ↔ u ∈ P.parts ∧ v ∈ P.parts ∧ u ≠ v ∧ ¬G.IsUniform ε u v
state_after: no goals
Theorem: Finset.filter_nonempty_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [nonempty_iff_ne_empty, Ne, filter_eq_empty_iff, Classical.not_not, not_forall,
  exists_prop]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
⊢ (filter p s).Nonempty ↔ ∃ a ∈ s, p a
state_after: no goals
Theorem: Basis.tensorProduct_apply
File: Mathlib/LinearAlgebra/TensorProduct/Basis.lean

tactic: simp [Basis.tensorProduct]
state_before: R : Type u_1
S : Type u_2
M : Type u_3
N : Type u_4
ι : Type u_5
κ : Type u_6
inst✝⁸ : CommSemiring R
inst✝⁷ : Semiring S
inst✝⁶ : Algebra R S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
i : ι
j : κ
⊢ (b.tensorProduct c) (i, j) = b i ⊗ₜ[R] c j
state_after: no goals
Theorem: SetTheory.PGame.toLeftMovesNim_one_symm
File: Mathlib/SetTheory/Game/Nim.lean

tactic: simp [eq_iff_true_of_subsingleton]
state_before: i : (nim 1).LeftMoves
⊢ toLeftMovesNim.symm i = ⟨0, ⋯⟩
state_after: no goals
Theorem: linearIndependent_insert
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: simp
state_before: ι : Type u'
ι' : Type u_1
R : Type u_2
K : Type u_3
M : Type u_4
M' : Type u_5
M'' : Type u_6
V : Type u
V' : Type u_7
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v : ι → V
s t : Set V
x y z : V
hxs : x ∉ s
⊢ (LinearIndependent K fun (x : ↑s) => id ↑x) ∧ id x ∉ span K (id '' s) ↔
    (LinearIndependent K fun (b : ↑s) => ↑b) ∧ x ∉ span K s
state_after: no goals
Theorem: Summable.toNNReal
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: apply NNReal.summable_coe.1
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → ℝ
hf : Summable f
⊢ Summable fun n => (f n).toNNReal
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → ℝ
hf : Summable f
⊢ Summable fun a => ↑(f a).toNNReal

tactic: refine .of_nonneg_of_le (fun n => NNReal.coe_nonneg _) (fun n => ?_) hf.abs
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → ℝ
hf : Summable f
⊢ Summable fun a => ↑(f a).toNNReal
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → ℝ
hf : Summable f
n : α
⊢ ↑(f n).toNNReal ≤ |f n|

tactic: simp only [le_abs_self, Real.coe_toNNReal', max_le_iff, abs_nonneg, and_self_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → ℝ
hf : Summable f
n : α
⊢ ↑(f n).toNNReal ≤ |f n|
state_after: no goals
Theorem: Nat.Icc_factorization_eq_pow_dvd
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: a b m n✝ p✝ n p : ℕ
pp : Prime p
⊢ Icc 1 (n.factorization p) = Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)
state_after: case inl
a b m n p✝ p : ℕ
pp : Prime p
⊢ Icc 1 ((factorization 0) p) = Finset.filter (fun i => p ^ i ∣ 0) (Ico 1 0)

case inr
a b m n✝ p✝ n p : ℕ
pp : Prime p
hn : n ≠ 0
⊢ Icc 1 (n.factorization p) = Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)

tactic: ext x
state_before: case inr
a b m n✝ p✝ n p : ℕ
pp : Prime p
hn : n ≠ 0
⊢ Icc 1 (n.factorization p) = Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)
state_after: case inr.a
a b m n✝ p✝ n p : ℕ
pp : Prime p
hn : n ≠ 0
x : ℕ
⊢ x ∈ Icc 1 (n.factorization p) ↔ x ∈ Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)

tactic: simp only [mem_Icc, Finset.mem_filter, mem_Ico, and_assoc, and_congr_right_iff,
  pp.pow_dvd_iff_le_factorization hn, iff_and_self]
state_before: case inr.a
a b m n✝ p✝ n p : ℕ
pp : Prime p
hn : n ≠ 0
x : ℕ
⊢ x ∈ Icc 1 (n.factorization p) ↔ x ∈ Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)
state_after: case inr.a
a b m n✝ p✝ n p : ℕ
pp : Prime p
hn : n ≠ 0
x : ℕ
⊢ 1 ≤ x → x ≤ n.factorization p → x < n

tactic: exact fun _ H => lt_of_le_of_lt H (factorization_lt p hn)
state_before: case inr.a
a b m n✝ p✝ n p : ℕ
pp : Prime p
hn : n ≠ 0
x : ℕ
⊢ 1 ≤ x → x ≤ n.factorization p → x < n
state_after: no goals

tactic: simp
state_before: case inl
a b m n p✝ p : ℕ
pp : Prime p
⊢ Icc 1 ((factorization 0) p) = Finset.filter (fun i => p ^ i ∣ 0) (Ico 1 0)
state_after: no goals
Theorem: MvPowerSeries.C_inv
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

tactic: rcases eq_or_ne r 0 with (rfl | hr)
state_before: σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
r : k
⊢ ((C σ k) r)⁻¹ = (C σ k) r⁻¹
state_after: case inl
σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
⊢ ((C σ k) 0)⁻¹ = (C σ k) 0⁻¹

case inr
σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
r : k
hr : r ≠ 0
⊢ ((C σ k) r)⁻¹ = (C σ k) r⁻¹

tactic: rw [MvPowerSeries.inv_eq_iff_mul_eq_one, ← map_mul, inv_mul_cancel hr, map_one]
state_before: case inr
σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
r : k
hr : r ≠ 0
⊢ ((C σ k) r)⁻¹ = (C σ k) r⁻¹
state_after: case inr
σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
r : k
hr : r ≠ 0
⊢ (constantCoeff σ k) ((C σ k) r) ≠ 0

tactic: simpa using hr
state_before: case inr
σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
r : k
hr : r ≠ 0
⊢ (constantCoeff σ k) ((C σ k) r) ≠ 0
state_after: no goals

tactic: simp
state_before: case inl
σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
⊢ ((C σ k) 0)⁻¹ = (C σ k) 0⁻¹
state_after: no goals
Theorem: OmegaCompletePartialOrder.ContinuousHom.forall_forall_merge'
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: rw [forall_swap, forall_forall_merge]
state_before: α : Type u
α' : Type u_1
β : Type v
β' : Type u_2
γ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
c₀ : Chain (α →𝒄 β)
c₁ : Chain α
z : β
⊢ (∀ (j i : ℕ), (c₀ i) (c₁ j) ≤ z) ↔ ∀ (i : ℕ), (c₀ i) (c₁ i) ≤ z
state_after: no goals