1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.degree_add_div
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

tactic: have : degree (p % q) < degree (q * (p / q)) :=
  calc
    degree (p % q) < degree q := EuclideanDomain.mod_lt _ hq0
    _ ≤ _ := degree_le_mul_left _ (mt (div_eq_zero_iff hq0).1 (not_lt_of_ge hpq))
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
hq0 : q ≠ 0
hpq : q.degree ≤ p.degree
⊢ q.degree + (p / q).degree = p.degree
state_after: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
hq0 : q ≠ 0
hpq : q.degree ≤ p.degree
this : (p % q).degree < (q * (p / q)).degree
⊢ q.degree + (p / q).degree = p.degree

tactic: conv_rhs =>
  rw [← EuclideanDomain.div_add_mod p q, degree_add_eq_left_of_degree_lt this, degree_mul]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
hq0 : q ≠ 0
hpq : q.degree ≤ p.degree
this : (p % q).degree < (q * (p / q)).degree
⊢ q.degree + (p / q).degree = p.degree
state_after: no goals
Theorem: leOnePart_div_oneLePart
File: Mathlib/Algebra/Order/Group/PosPart.lean

tactic: rw [← inv_div, oneLePart_div_leOnePart]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ a : α
⊢ a⁻ᵐ / a⁺ᵐ = a⁻¹
state_after: no goals
Theorem: CategoryTheory.Bicategory.eqToHom_whiskerRight
File: Mathlib/CategoryTheory/Bicategory/Strict.lean

tactic: cases η
state_before: B : Type u
inst✝ : Bicategory B
a b c : B
f g : a ⟶ b
η : f = g
h : b ⟶ c
⊢ eqToHom η ▷ h = eqToHom ⋯
state_after: case refl
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
h : b ⟶ c
⊢ eqToHom ⋯ ▷ h = eqToHom ⋯

tactic: simp only [id_whiskerRight, eqToHom_refl]
state_before: case refl
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
h : b ⟶ c
⊢ eqToHom ⋯ ▷ h = eqToHom ⋯
state_after: no goals
Theorem: Submodule.traceDual_bot
File: Mathlib/RingTheory/DedekindDomain/Different.lean

tactic: ext
state_before: A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
⊢ ⊥ᵛ = ⊤
state_after: case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x✝ : L
⊢ x✝ ∈ ⊥ᵛ ↔ x✝ ∈ ⊤

tactic: simpa [mem_traceDual, -RingHom.mem_range] using zero_mem _
state_before: case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x✝ : L
⊢ x✝ ∈ ⊥ᵛ ↔ x✝ ∈ ⊤
state_after: no goals
Theorem: SimplexCategory.eq_id_of_epi
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: suffices IsIso i by
  haveI := this
  apply eq_id_of_isIso
state_before: x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ i = 𝟙 x
state_after: x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ IsIso i

tactic: apply isIso_of_bijective
state_before: x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ IsIso i
state_after: case hf
x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ Function.Bijective (Hom.toOrderHom i).toFun

tactic: dsimp
state_before: case hf
x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ Function.Bijective (Hom.toOrderHom i).toFun
state_after: case hf
x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ Function.Bijective ⇑(Hom.toOrderHom i)

tactic: rw [Fintype.bijective_iff_surjective_and_card i.toOrderHom, ← epi_iff_surjective,
  eq_self_iff_true, and_true_iff]
state_before: case hf
x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ Function.Bijective ⇑(Hom.toOrderHom i)
state_after: case hf
x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ Epi i

tactic: infer_instance
state_before: case hf
x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
⊢ Epi i
state_after: no goals

tactic: haveI := this
state_before: x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
this : IsIso i
⊢ i = 𝟙 x
state_after: x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
this✝ this : IsIso i
⊢ i = 𝟙 x

tactic: apply eq_id_of_isIso
state_before: x : SimplexCategory
i : x ⟶ x
inst✝ : Epi i
this✝ this : IsIso i
⊢ i = 𝟙 x
state_after: no goals
Theorem: List.getD_eq_default
File: Mathlib/Data/List/GetD.lean

tactic: exact getD_nil
state_before: case nil
α : Type u
β : Type v
l : List α
x : α
xs : List α
n✝ : ℕ
d : α
n : ℕ
hn : [].length ≤ n
⊢ [].getD n d = d
state_after: no goals

tactic: cases n
state_before: case cons
α : Type u
β : Type v
l : List α
x : α
xs : List α
n✝ : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ}, tail.length ≤ n → tail.getD n d = d
n : ℕ
hn : (head :: tail).length ≤ n
⊢ (head :: tail).getD n d = d
state_after: case cons.zero
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ}, tail.length ≤ n → tail.getD n d = d
hn : (head :: tail).length ≤ 0
⊢ (head :: tail).getD 0 d = d

case cons.succ
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ}, tail.length ≤ n → tail.getD n d = d
n✝ : ℕ
hn : (head :: tail).length ≤ n✝ + 1
⊢ (head :: tail).getD (n✝ + 1) d = d

tactic: simp at hn
state_before: case cons.zero
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ}, tail.length ≤ n → tail.getD n d = d
hn : (head :: tail).length ≤ 0
⊢ (head :: tail).getD 0 d = d
state_after: no goals

tactic: exact ih (Nat.le_of_succ_le_succ hn)
state_before: case cons.succ
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ}, tail.length ≤ n → tail.getD n d = d
n✝ : ℕ
hn : (head :: tail).length ≤ n✝ + 1
⊢ (head :: tail).getD (n✝ + 1) d = d
state_after: no goals
Theorem: CochainComplex.isoHomologyπ₀_inv_naturality
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

tactic: simp only [← cancel_epi (K.homologyπ 0), HomologicalComplex.homologyπ_naturality_assoc,
  HomologicalComplex.isoHomologyπ_hom_inv_id, comp_id,
  HomologicalComplex.isoHomologyπ_hom_inv_id_assoc]
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroMorphisms C
K L : CochainComplex C ℕ
φ : K ⟶ L
inst✝¹ : HomologicalComplex.HasHomology K 0
inst✝ : HomologicalComplex.HasHomology L 0
⊢ HomologicalComplex.homologyMap φ 0 ≫ L.isoHomologyπ₀.inv = K.isoHomologyπ₀.inv ≫ HomologicalComplex.cyclesMap φ 0
state_after: no goals
Theorem: Int.sq_ne_two_mod_four
File: Mathlib/NumberTheory/PythagoreanTriples.lean

tactic: suffices ¬z * z % (4 : ℕ) = 2 % (4 : ℕ) by exact this
state_before: z : ℤ
⊢ z * z % 4 ≠ 2
state_after: z : ℤ
⊢ ¬z * z % ↑4 = 2 % ↑4

tactic: rw [← ZMod.intCast_eq_intCast_iff']
state_before: z : ℤ
⊢ ¬z * z % ↑4 = 2 % ↑4
state_after: z : ℤ
⊢ ¬↑(z * z) = ↑2

tactic: simpa using sq_ne_two_fin_zmod_four _
state_before: z : ℤ
⊢ ¬↑(z * z) = ↑2
state_after: no goals

tactic: exact this
state_before: z : ℤ
this : ¬z * z % ↑4 = 2 % ↑4
⊢ z * z % 4 ≠ 2
state_after: no goals
Theorem: List.foldl_eq_of_comm_of_assoc
File: Mathlib/Data/List/Basic.lean

tactic: simp only [foldl_cons]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ foldl f a (b :: c :: l) = f b (foldl f a (c :: l))
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ foldl f (f (f a b) c) l = f b (foldl f (f a c) l)

tactic: rw [← foldl_eq_of_comm_of_assoc .., right_comm _ hcomm hassoc]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ foldl f (f (f a b) c) l = f b (foldl f (f a c) l)
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ foldl f (f (f a c) b) l = foldl f (f a c) (b :: l)

tactic: rfl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ foldl f (f (f a c) b) l = foldl f (f a c) (b :: l)
state_after: no goals
Theorem: Polynomial.span_of_finite_le_degreeLT
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: rcases span_le_degreeLE_of_finite s_fin with ⟨n, _⟩
state_before: R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
⊢ ∃ n, Submodule.span R s ≤ degreeLT R n
state_after: case intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
n : ℕ
h✝ : Submodule.span R s ≤ degreeLE R ↑n
⊢ ∃ n, Submodule.span R s ≤ degreeLT R n

tactic: exact ⟨n + 1, by rwa [degreeLT_succ_eq_degreeLE]⟩
state_before: case intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
n : ℕ
h✝ : Submodule.span R s ≤ degreeLE R ↑n
⊢ ∃ n, Submodule.span R s ≤ degreeLT R n
state_after: no goals

tactic: rwa [degreeLT_succ_eq_degreeLE]
state_before: R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
n : ℕ
h✝ : Submodule.span R s ≤ degreeLE R ↑n
⊢ Submodule.span R s ≤ degreeLT R (n + 1)
state_after: no goals
Theorem: lowerSemicontinuousWithinAt_iSup
File: Mathlib/Topology/Semicontinuous.lean

tactic: simp
state_before: α : Type u_1
inst✝³ : TopologicalSpace α
β : Type u_2
inst✝² : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
ι : Sort u_3
δ : Type u_4
δ' : Type u_5
inst✝¹ : CompleteLinearOrder δ
inst✝ : ConditionallyCompleteLinearOrder δ'
f : ι → α → δ
h : ∀ (i : ι), LowerSemicontinuousWithinAt (f i) s x
⊢ ∀ᶠ (y : α) in 𝓝[s] x, BddAbove (range fun i => f i y)
state_after: no goals
Theorem: OrderHom.id_comp
File: Mathlib/Order/Hom/Basic.lean

tactic: ext
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝³ : Preorder α
inst✝² : Preorder β
inst✝¹ : Preorder γ
inst✝ : Preorder δ
f : α →o β
⊢ id.comp f = f
state_after: case h.h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝³ : Preorder α
inst✝² : Preorder β
inst✝¹ : Preorder γ
inst✝ : Preorder δ
f : α →o β
x✝ : α
⊢ (id.comp f) x✝ = f x✝

tactic: rfl
state_before: case h.h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝³ : Preorder α
inst✝² : Preorder β
inst✝¹ : Preorder γ
inst✝ : Preorder δ
f : α →o β
x✝ : α
⊢ (id.comp f) x✝ = f x✝
state_after: no goals
Theorem: sdiff_eq_self_iff_disjoint'
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sdiff_eq_self_iff_disjoint, disjoint_comm]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ x \ y = x ↔ Disjoint x y
state_after: no goals
Theorem: Num.ofNat'_succ
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp [zero_add]
state_before: α : Type u_1
⊢ ofNat' (0 + 1) = ofNat' 0 + 1
state_after: no goals

tactic: cases b
state_before: α : Type u_1
b : Bool
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ ofNat' (Nat.bit b n + 1) = ofNat' (Nat.bit b n) + 1
state_after: case false
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ ofNat' (Nat.bit false n + 1) = ofNat' (Nat.bit false n) + 1

case true
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ ofNat' (Nat.bit true n + 1) = ofNat' (Nat.bit true n) + 1

tactic: erw [ofNat'_bit true n, ofNat'_bit]
state_before: case false
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ ofNat' (Nat.bit false n + 1) = ofNat' (Nat.bit false n) + 1
state_after: case false
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ (bif true then Num.bit1 else Num.bit0) (ofNat' n) = (bif false then Num.bit1 else Num.bit0) (ofNat' n) + 1

tactic: simp only [← bit1_of_bit1, ← bit0_of_bit0, cond, _root_.bit1]
state_before: case false
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ (bif true then Num.bit1 else Num.bit0) (ofNat' n) = (bif false then Num.bit1 else Num.bit0) (ofNat' n) + 1
state_after: no goals

tactic: erw [show n.bit true + 1 = (n + 1).bit false by
  simpa [Nat.bit, _root_.bit1, _root_.bit0] using Nat.add_left_comm n 1 1,
  ofNat'_bit, ofNat'_bit, ih]
state_before: case true
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ ofNat' (Nat.bit true n + 1) = ofNat' (Nat.bit true n) + 1
state_after: case true
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ (bif false then Num.bit1 else Num.bit0) (ofNat' n + 1) = (bif true then Num.bit1 else Num.bit0) (ofNat' n) + 1

tactic: simp only [cond, add_one, bit1_succ]
state_before: case true
α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ (bif false then Num.bit1 else Num.bit0) (ofNat' n + 1) = (bif true then Num.bit1 else Num.bit0) (ofNat' n) + 1
state_after: no goals

tactic: simpa [Nat.bit, _root_.bit1, _root_.bit0] using Nat.add_left_comm n 1 1
state_before: α : Type u_1
n : ℕ
ih : ofNat' (n + 1) = ofNat' n + 1
⊢ Nat.bit true n + 1 = Nat.bit false (n + 1)
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.leftShift_neg
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

tactic: change leftShiftAddEquiv K L n a n' hn' (-γ) = _
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
⊢ (-γ).leftShift a n' hn' = -γ.leftShift a n' hn'
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
⊢ (leftShiftAddEquiv K L n a n' hn') (-γ) = -γ.leftShift a n' hn'

tactic: apply _root_.map_neg
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
⊢ (leftShiftAddEquiv K L n a n' hn') (-γ) = -γ.leftShift a n' hn'
state_after: no goals
Theorem: HomologicalComplex.biprod_inl_desc_f
File: Mathlib/Algebra/Homology/HomologicalComplexBiprod.lean

tactic: rw [← comp_f, biprod.inl_desc]
state_before: C : Type u_1
ι : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Preadditive C
c : ComplexShape ι
K L : HomologicalComplex C c
inst✝ : ∀ (i : ι), HasBinaryBiproduct (K.X i) (L.X i)
M : HomologicalComplex C c
α : K ⟶ M
β : L ⟶ M
i : ι
⊢ biprod.inl.f i ≫ (biprod.desc α β).f i = α.f i
state_after: no goals
Theorem: tendsto_comp_coe_Ioo_atBot
File: Mathlib/Topology/Order/DenselyOrdered.lean

tactic: rw [← map_coe_Ioo_atBot h, tendsto_map'_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f : α → β
h : a < b
⊢ Tendsto (fun x => f ↑x) atBot l ↔ Tendsto f (𝓝[>] a) l
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f : α → β
h : a < b
⊢ Tendsto (fun x => f ↑x) atBot l ↔ Tendsto (f ∘ Subtype.val) atBot l

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f : α → β
h : a < b
⊢ Tendsto (fun x => f ↑x) atBot l ↔ Tendsto (f ∘ Subtype.val) atBot l
state_after: no goals
Theorem: mul_eq_of_eq_mul_inv₀
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: rwa [← eq_mul_inv_iff_mul_eq₀]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c d : G₀
m n : ℕ
ha : a ≠ 0
h : a = c * b⁻¹
⊢ a * b = c
state_after: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c d : G₀
m n : ℕ
ha : a ≠ 0
h : a = c * b⁻¹
⊢ b ≠ 0

tactic: rintro rfl
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c d : G₀
m n : ℕ
ha : a ≠ 0
h : a = c * b⁻¹
⊢ b ≠ 0
state_after: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a c d : G₀
m n : ℕ
ha : a ≠ 0
h : a = c * 0⁻¹
⊢ False

tactic: simp [ha] at h
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a c d : G₀
m n : ℕ
ha : a ≠ 0
h : a = c * 0⁻¹
⊢ False
state_after: no goals
Theorem: ModuleCat.MonoidalCategory.hexagon_reverse
File: Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean

tactic: apply (cancel_epi (α_ X Y Z).hom).1
state_before: R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
⊢ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv =
    X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y
state_after: R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
⊢ (α_ X Y Z).hom ≫ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv =
    (α_ X Y Z).hom ≫ X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y

tactic: apply TensorProduct.ext_threefold
state_before: R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
⊢ (α_ X Y Z).hom ≫ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv =
    (α_ X Y Z).hom ≫ X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y
state_after: case H
R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
⊢ ∀ (x : ↑X) (y : ↑Y) (z : ↑Z),
    ((α_ X Y Z).hom ≫ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
      ((α_ X Y Z).hom ≫ X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)

tactic: intro x y z
state_before: case H
R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
⊢ ∀ (x : ↑X) (y : ↑Y) (z : ↑Z),
    ((α_ X Y Z).hom ≫ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
      ((α_ X Y Z).hom ≫ X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)
state_after: case H
R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
x : ↑X
y : ↑Y
z : ↑Z
⊢ ((α_ X Y Z).hom ≫ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
    ((α_ X Y Z).hom ≫ X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)

tactic: rfl
state_before: case H
R : Type u
inst✝ : CommRing R
X Y Z : ModuleCat R
x : ↑X
y : ↑Y
z : ↑Z
⊢ ((α_ X Y Z).hom ≫ (α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
    ((α_ X Y Z).hom ≫ X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)
state_after: no goals
Theorem: Representation.asAlgebraHom_single_one
File: Mathlib/RepresentationTheory/Basic.lean

tactic: simp
state_before: k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Monoid G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
g : G
⊢ ρ.asAlgebraHom (Finsupp.single g 1) = ρ g
state_after: no goals
Theorem: Nat.modEq_eleven_digits_sum
File: Mathlib/Data/Nat/Digits.lean

tactic: have t := zmodeq_ofDigits_digits 11 10 (-1 : ℤ) (by unfold Int.ModEq; rfl) n
state_before: n✝ n : ℕ
⊢ ↑n ≡ (List.map (fun n => ↑n) (digits 10 n)).alternatingSum [ZMOD 11]
state_after: n✝ n : ℕ
t : ↑n ≡ ofDigits (-1) (digits 10 n) [ZMOD ↑11]
⊢ ↑n ≡ (List.map (fun n => ↑n) (digits 10 n)).alternatingSum [ZMOD 11]

tactic: rwa [ofDigits_neg_one] at t
state_before: n✝ n : ℕ
t : ↑n ≡ ofDigits (-1) (digits 10 n) [ZMOD ↑11]
⊢ ↑n ≡ (List.map (fun n => ↑n) (digits 10 n)).alternatingSum [ZMOD 11]
state_after: no goals

tactic: unfold Int.ModEq
state_before: n✝ n : ℕ
⊢ ↑10 ≡ -1 [ZMOD ↑11]
state_after: n✝ n : ℕ
⊢ ↑10 % ↑11 = -1 % ↑11

tactic: rfl
state_before: n✝ n : ℕ
⊢ ↑10 % ↑11 = -1 % ↑11
state_after: no goals
Theorem: Setoid.sup_eq_eqvGen
File: Mathlib/Data/Setoid/Basic.lean

tactic: rw [eqvGen_eq]
state_before: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y
state_after: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ r ⊔ s = sInf {s_1 | ∀ ⦃x y : α⦄, r.Rel x y ∨ s.Rel x y → s_1.Rel x y}

tactic: apply congr_arg sInf
state_before: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ r ⊔ s = sInf {s_1 | ∀ ⦃x y : α⦄, r.Rel x y ∨ s.Rel x y → s_1.Rel x y}
state_after: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ {x | r ≤ x ∧ s ≤ x} = {s_1 | ∀ ⦃x y : α⦄, r.Rel x y ∨ s.Rel x y → s_1.Rel x y}

tactic: simp only [le_def, or_imp, ← forall_and]
state_before: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ {x | r ≤ x ∧ s ≤ x} = {s_1 | ∀ ⦃x y : α⦄, r.Rel x y ∨ s.Rel x y → s_1.Rel x y}
state_after: no goals
Theorem: Ideal.absNorm_bot
File: Mathlib/RingTheory/Ideal/Norm.lean

tactic: rw [← Ideal.zero_eq_bot, _root_.map_zero]
state_before: S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
⊢ absNorm ⊥ = 0
state_after: no goals
Theorem: Submodule.mem_orthogonal_singleton_iff_inner_left
File: Mathlib/Analysis/InnerProductSpace/Orthogonal.lean

tactic: rw [mem_orthogonal_singleton_iff_inner_right, inner_eq_zero_symm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace 𝕜 F
K : Submodule 𝕜 E
u v : E
⊢ v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0
state_after: no goals
Theorem: USize.toUInt64_toNat
File: .lake/packages/batteries/Batteries/Data/UInt.lean

tactic: simp only [USize.toUInt64, UInt64.toNat]
state_before: x : USize
⊢ x.toUInt64.toNat = x.toNat
state_after: x : USize
⊢ ↑x.val = x.toNat

tactic: rfl
state_before: x : USize
⊢ ↑x.val = x.toNat
state_after: no goals
Theorem: InnerProductSpace.Core.inner_neg_right
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [← inner_conj_symm, inner_neg_left]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ ⟪x, -y⟫_𝕜 = -⟪x, y⟫_𝕜
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ (starRingEnd 𝕜) (-⟪y, x⟫_𝕜) = -⟪x, y⟫_𝕜

tactic: simp only [RingHom.map_neg, inner_conj_symm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ (starRingEnd 𝕜) (-⟪y, x⟫_𝕜) = -⟪x, y⟫_𝕜
state_after: no goals