1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: PartENat.add_lt_add_right
File: Mathlib/Data/Nat/PartENat.lean

tactic: rcases ne_top_iff.mp (ne_top_of_lt h) with ⟨m, rfl⟩
state_before: x y z : PartENat
h : x < y
hz : z ≠ ⊤
⊢ x + z < y + z
state_after: case intro
y z : PartENat
hz : z ≠ ⊤
m : ℕ
h : ↑m < y
⊢ ↑m + z < y + z

tactic: rcases ne_top_iff.mp hz with ⟨k, rfl⟩
state_before: case intro
y z : PartENat
hz : z ≠ ⊤
m : ℕ
h : ↑m < y
⊢ ↑m + z < y + z
state_after: case intro.intro
y : PartENat
m : ℕ
h : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
⊢ ↑m + ↑k < y + ↑k

tactic: induction' y using PartENat.casesOn with n
state_before: case intro.intro
y : PartENat
m : ℕ
h : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
⊢ ↑m + ↑k < y + ↑k
state_after: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑m + ↑k < ⊤ + ↑k

case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : ↑m < ↑n
⊢ ↑m + ↑k < ↑n + ↑k

tactic: norm_cast at h
state_before: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : ↑m < ↑n
⊢ ↑m + ↑k < ↑n + ↑k
state_after: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : m < n
⊢ ↑m + ↑k < ↑n + ↑k

tactic: norm_cast
state_before: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : m < n
⊢ ↑m + ↑k < ↑n + ↑k
state_after: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : m < n
⊢ m + k < n + k

tactic: apply add_lt_add_right h
state_before: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : m < n
⊢ m + k < n + k
state_after: no goals

tactic: rw [top_add]
state_before: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑m + ↑k < ⊤ + ↑k
state_after: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑m + ↑k < ⊤

tactic: norm_cast
state_before: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑m + ↑k < ⊤
state_after: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑(m + k) < ⊤

tactic: apply natCast_lt_top
state_before: case intro.intro.a
m k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑(m + k) < ⊤
state_after: no goals
Theorem: Polynomial.trailingDegree_mul
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: by_cases hp : p = 0
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree
state_after: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree

case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree

tactic: by_cases hq : q = 0
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree
state_after: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
hq : q = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree

case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
hq : ¬q = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree

tactic: rw [hp, zero_mul, trailingDegree_zero, top_add]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree
state_after: no goals

tactic: rw [hq, mul_zero, trailingDegree_zero, add_top]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
hq : q = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree
state_after: no goals

tactic: rw [trailingDegree_eq_natTrailingDegree hp, trailingDegree_eq_natTrailingDegree hq,
trailingDegree_eq_natTrailingDegree (mul_ne_zero hp hq), natTrailingDegree_mul hp hq]
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
hq : ¬q = 0
⊢ (p * q).trailingDegree = p.trailingDegree + q.trailingDegree
state_after: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
hq : ¬q = 0
⊢ ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrailingDegree

tactic: apply WithTop.coe_add
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : ¬p = 0
hq : ¬q = 0
⊢ ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrailingDegree
state_after: no goals
Theorem: Polynomial.Separable.isIntegral
File: Mathlib/FieldTheory/Separable.lean

tactic: cases subsingleton_or_nontrivial F
state_before: F : Type u_1
K : Type u_2
inst✝² : CommRing F
inst✝¹ : Ring K
inst✝ : Algebra F K
x : K
h : (minpoly F x).Separable
⊢ IsIntegral F x
state_after: case inl
F : Type u_1
K : Type u_2
inst✝² : CommRing F
inst✝¹ : Ring K
inst✝ : Algebra F K
x : K
h : (minpoly F x).Separable
h✝ : Subsingleton F
⊢ IsIntegral F x

case inr
F : Type u_1
K : Type u_2
inst✝² : CommRing F
inst✝¹ : Ring K
inst✝ : Algebra F K
x : K
h : (minpoly F x).Separable
h✝ : Nontrivial F
⊢ IsIntegral F x

tactic: haveI := Module.subsingleton F K
state_before: case inl
F : Type u_1
K : Type u_2
inst✝² : CommRing F
inst✝¹ : Ring K
inst✝ : Algebra F K
x : K
h : (minpoly F x).Separable
h✝ : Subsingleton F
⊢ IsIntegral F x
state_after: case inl
F : Type u_1
K : Type u_2
inst✝² : CommRing F
inst✝¹ : Ring K
inst✝ : Algebra F K
x : K
h : (minpoly F x).Separable
h✝ : Subsingleton F
this : Subsingleton K
⊢ IsIntegral F x

tactic: exact ⟨1, monic_one, Subsingleton.elim _ _⟩
state_before: case inl
F : Type u_1
K : Type u_2
inst✝² : CommRing F
inst✝¹ : Ring K
inst✝ : Algebra F K
x : K
h : (minpoly F x).Separable
h✝ : Subsingleton F
this : Subsingleton K
⊢ IsIntegral F x
state_after: no goals
Theorem: CategoryTheory.Limits.IsBilimit.total
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: cases j
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Preadditive C
J : Type
inst✝ : Fintype J
f : J → C
b : Bicone f
i : b.IsBilimit
j : Discrete J
⊢ (∑ j : J, b.π j ≫ b.ι j) ≫ b.toCone.π.app j = 𝟙 b.pt ≫ b.toCone.π.app j
state_after: case mk
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Preadditive C
J : Type
inst✝ : Fintype J
f : J → C
b : Bicone f
i : b.IsBilimit
as✝ : J
⊢ (∑ j : J, b.π j ≫ b.ι j) ≫ b.toCone.π.app { as := as✝ } = 𝟙 b.pt ≫ b.toCone.π.app { as := as✝ }

tactic: simp [sum_comp, b.ι_π, comp_dite]
state_before: case mk
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Preadditive C
J : Type
inst✝ : Fintype J
f : J → C
b : Bicone f
i : b.IsBilimit
as✝ : J
⊢ (∑ j : J, b.π j ≫ b.ι j) ≫ b.toCone.π.app { as := as✝ } = 𝟙 b.pt ≫ b.toCone.π.app { as := as✝ }
state_after: no goals
Theorem: Nat.floorRoot_zero_right
File: Mathlib/Data/Nat/Factorization/Root.lean

tactic: simp [floorRoot]
state_before: a b n✝ n : ℕ
⊢ n.floorRoot 0 = 0
state_after: no goals
Theorem: LinearMap.polyCharpoly_eq_of_basis
File: Mathlib/Algebra/Module/LinearMap/Polynomial.lean

tactic: rw [polyCharpoly, φ.polyCharpolyAux_basisIndep b (Module.Free.chooseBasis R M) bₘ,
  polyCharpolyAux]
state_before: R : Type u_1
L : Type u_2
M : Type u_3
n : Type u_4
ι : Type u_5
ι' : Type u_6
ιM : Type u_7
inst✝¹² : CommRing R
inst✝¹¹ : AddCommGroup L
inst✝¹⁰ : Module R L
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
φ : L →ₗ[R] Module.End R M
inst✝⁷ : Fintype ι
inst✝⁶ : Fintype ι'
inst✝⁵ : Fintype ιM
inst✝⁴ : DecidableEq ι
inst✝³ : DecidableEq ι'
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
b : Basis ι R L
inst✝ : DecidableEq ιM
bₘ : Basis ιM R M
⊢ φ.polyCharpoly b = Polynomial.map (↑(MvPolynomial.bind₁ (toMvPolynomial b bₘ.end φ))) (charpoly.univ R ιM)
state_after: no goals
Theorem: Nat.factorization_div
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rcases eq_or_ne d 0 with (rfl | hd)
state_before: a b m n✝ p d n : ℕ
h : d ∣ n
⊢ (n / d).factorization = n.factorization - d.factorization
state_after: case inl
a b m n✝ p n : ℕ
h : 0 ∣ n
⊢ (n / 0).factorization = n.factorization - factorization 0

case inr
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
⊢ (n / d).factorization = n.factorization - d.factorization

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: case inr
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
⊢ (n / d).factorization = n.factorization - d.factorization
state_after: case inr.inl
a b m n p d : ℕ
hd : d ≠ 0
h : d ∣ 0
⊢ (0 / d).factorization = factorization 0 - d.factorization

case inr.inr
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
hn : n ≠ 0
⊢ (n / d).factorization = n.factorization - d.factorization

tactic: apply add_left_injective d.factorization
state_before: case inr.inr
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
hn : n ≠ 0
⊢ (n / d).factorization = n.factorization - d.factorization
state_after: case inr.inr.a
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
hn : n ≠ 0
⊢ (fun x => x + d.factorization) (n / d).factorization =
    (fun x => x + d.factorization) (n.factorization - d.factorization)

tactic: simp only
state_before: case inr.inr.a
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
hn : n ≠ 0
⊢ (fun x => x + d.factorization) (n / d).factorization =
    (fun x => x + d.factorization) (n.factorization - d.factorization)
state_after: case inr.inr.a
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
hn : n ≠ 0
⊢ (n / d).factorization + d.factorization = n.factorization - d.factorization + d.factorization

tactic: rw [tsub_add_cancel_of_le <| (Nat.factorization_le_iff_dvd hd hn).mpr h, ←
  Nat.factorization_mul (Nat.div_pos (Nat.le_of_dvd hn.bot_lt h) hd.bot_lt).ne' hd,
  Nat.div_mul_cancel h]
state_before: case inr.inr.a
a b m n✝ p d n : ℕ
h : d ∣ n
hd : d ≠ 0
hn : n ≠ 0
⊢ (n / d).factorization + d.factorization = n.factorization - d.factorization + d.factorization
state_after: no goals

tactic: simp [zero_dvd_iff.mp h]
state_before: case inl
a b m n✝ p n : ℕ
h : 0 ∣ n
⊢ (n / 0).factorization = n.factorization - factorization 0
state_after: no goals

tactic: simp
state_before: case inr.inl
a b m n p d : ℕ
hd : d ≠ 0
h : d ∣ 0
⊢ (0 / d).factorization = factorization 0 - d.factorization
state_after: no goals
Theorem: AlgebraicGeometry.quasi_compact_affineProperty_diagonal_eq
File: Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean

tactic: funext
state_before: X Y : Scheme
f : X ⟶ Y
⊢ QuasiCompact.affineProperty.diagonal = QuasiSeparated.affineProperty
state_after: case h.h.h.h
X Y : Scheme
f : X ⟶ Y
x✝³ x✝² : Scheme
x✝¹ : x✝³ ⟶ x✝²
x✝ : IsAffine x✝²
⊢ QuasiCompact.affineProperty.diagonal x✝¹ = QuasiSeparated.affineProperty x✝¹

tactic: rw [quasi_compact_affineProperty_iff_quasiSeparatedSpace]
state_before: case h.h.h.h
X Y : Scheme
f : X ⟶ Y
x✝³ x✝² : Scheme
x✝¹ : x✝³ ⟶ x✝²
x✝ : IsAffine x✝²
⊢ QuasiCompact.affineProperty.diagonal x✝¹ = QuasiSeparated.affineProperty x✝¹
state_after: case h.h.h.h
X Y : Scheme
f : X ⟶ Y
x✝³ x✝² : Scheme
x✝¹ : x✝³ ⟶ x✝²
x✝ : IsAffine x✝²
⊢ QuasiSeparatedSpace ↑↑x✝³.toPresheafedSpace = QuasiSeparated.affineProperty x✝¹

tactic: rfl
state_before: case h.h.h.h
X Y : Scheme
f : X ⟶ Y
x✝³ x✝² : Scheme
x✝¹ : x✝³ ⟶ x✝²
x✝ : IsAffine x✝²
⊢ QuasiSeparatedSpace ↑↑x✝³.toPresheafedSpace = QuasiSeparated.affineProperty x✝¹
state_after: no goals
Theorem: Set.sized_iUnion
File: Mathlib/Data/Finset/Slice.lean

tactic: simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
s : Finset α
r : ℕ
f : ι → Set (Finset α)
⊢ Sized r (⋃ i, f i) ↔ ∀ (i : ι), Sized r (f i)
state_after: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
s : Finset α
r : ℕ
f : ι → Set (Finset α)
⊢ (∀ ⦃x : Finset α⦄ (x_1 : ι), x ∈ f x_1 → x.card = r) ↔ ∀ (i : ι) ⦃x : Finset α⦄, x ∈ f i → x.card = r

tactic: exact forall_swap
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
s : Finset α
r : ℕ
f : ι → Set (Finset α)
⊢ (∀ ⦃x : Finset α⦄ (x_1 : ι), x ∈ f x_1 → x.card = r) ↔ ∀ (i : ι) ⦃x : Finset α⦄, x ∈ f i → x.card = r
state_after: no goals
Theorem: CategoryTheory.Limits.coprod.desc_comp_inl_comp_inr
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: rw [← coprod.map_desc]
state_before: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ W X Y Z : C
inst✝¹ : HasBinaryCoproduct W Y
inst✝ : HasBinaryCoproduct X Z
g : W ⟶ X
g' : Y ⟶ Z
⊢ desc (g ≫ inl) (g' ≫ inr) = map g g'
state_after: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ W X Y Z : C
inst✝¹ : HasBinaryCoproduct W Y
inst✝ : HasBinaryCoproduct X Z
g : W ⟶ X
g' : Y ⟶ Z
⊢ map g g' ≫ desc inl inr = map g g'

tactic: simp
state_before: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ W X Y Z : C
inst✝¹ : HasBinaryCoproduct W Y
inst✝ : HasBinaryCoproduct X Z
g : W ⟶ X
g' : Y ⟶ Z
⊢ map g g' ≫ desc inl inr = map g g'
state_after: no goals
Theorem: Fintype.prod_eq_mul
File: Mathlib/Data/Fintype/BigOperators.lean

tactic: apply Finset.prod_eq_mul a b h₁ fun x _ hx => h₂ x hx <;>
  exact fun hc => (hc (Finset.mem_univ _)).elim
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
M : Type u_4
inst✝¹ : Fintype α
inst✝ : CommMonoid M
f : α → M
a b : α
h₁ : a ≠ b
h₂ : ∀ (x : α), x ≠ a ∧ x ≠ b → f x = 1
⊢ ∏ x : α, f x = f a * f b
state_after: no goals
Theorem: NumberField.mixedEmbedding.latticeBasis_apply
File: Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean

tactic: simp only [latticeBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Function.comp_apply,
  canonicalEmbedding.latticeBasis_apply, integralBasis_apply, commMap_canonical_eq_mixed]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
i : ChooseBasisIndex ℤ (𝓞 K)
⊢ (latticeBasis K) i = (mixedEmbedding K) ((integralBasis K) i)
state_after: no goals
Theorem: Multiset.Ico_cons_right
File: Mathlib/Order/Interval/Multiset.lean

tactic: classical
  rw [Ico, ← Finset.insert_val_of_not_mem right_not_mem_Ico, Finset.Ico_insert_right h]
  rfl
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a ≤ b
⊢ b ::ₘ Ico a b = Icc a b
state_after: no goals

tactic: rw [Ico, ← Finset.insert_val_of_not_mem right_not_mem_Ico, Finset.Ico_insert_right h]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a ≤ b
⊢ b ::ₘ Ico a b = Icc a b
state_after: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a ≤ b
⊢ (Finset.Icc a b).val = Icc a b

tactic: rfl
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a ≤ b
⊢ (Finset.Icc a b).val = Icc a b
state_after: no goals
Theorem: CategoryTheory.Limits.WidePushout.head_desc
File: Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean

tactic: simp only [colimit.ι_desc, WidePushoutShape.mkCocone_pt, WidePushoutShape.mkCocone_ι_app]
state_before: J : Type w
C✝ : Type u
inst✝² : Category.{v, u} C✝
C : Type u
inst✝¹ : Category.{v, u} C
B : C
objs : J → C
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : C
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
⊢ head arrows ≫ desc f fs w = f
state_after: no goals
Theorem: ENNReal.toReal_eq_toReal_iff'
File: Mathlib/Data/ENNReal/Basic.lean

tactic: simp only [ENNReal.toReal, NNReal.coe_inj, toNNReal_eq_toNNReal_iff' hx hy]
state_before: α : Type u_1
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y : ℝ≥0∞
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x.toReal = y.toReal ↔ x = y
state_after: no goals
Theorem: padicValNat.div_pow
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: rw [padicValNat.div_of_dvd dvd, padicValNat.prime_pow]
state_before: p a b : ℕ
hp : Fact (Nat.Prime p)
dvd : p ^ a ∣ b
⊢ padicValNat p (b / p ^ a) = padicValNat p b - a
state_after: no goals
Theorem: InnerProductGeometry.cos_eq_one_iff_angle_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [← cos_zero]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ cos (angle x y) = 1 ↔ angle x y = 0
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ cos (angle x y) = cos 0 ↔ angle x y = 0

tactic: exact injOn_cos.eq_iff ⟨angle_nonneg x y, angle_le_pi x y⟩ (left_mem_Icc.2 pi_pos.le)
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ cos (angle x y) = cos 0 ↔ angle x y = 0
state_after: no goals
Theorem: NonAssocRing.toNonUnitalNonAssocring_injective
File: Mathlib/Algebra/Ring/Ext.lean

tactic: intro _ _ _
state_before: R : Type u
⊢ Function.Injective (@toNonUnitalNonAssocRing R)
state_after: R : Type u
a₁✝ a₂✝ : NonAssocRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝

tactic: ext <;> congr
state_before: R : Type u
a₁✝ a₂✝ : NonAssocRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝
state_after: no goals
Theorem: bddBelow_bddAbove_iff_subset_Icc
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp [Ici_inter_Iic.symm, subset_inter_iff, bddBelow_iff_subset_Ici,
  bddAbove_iff_subset_Iic, exists_and_left, exists_and_right]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
a b : α
⊢ BddBelow s ∧ BddAbove s ↔ ∃ a b, s ⊆ Icc a b
state_after: no goals
Theorem: Pell.strictMono_y
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have : yn a1 m ≤ yn a1 n :=
  Or.elim (lt_or_eq_of_le <| Nat.le_of_succ_le_succ h) (fun hl => le_of_lt <| strictMono_y hl)
    fun e => by rw [e]
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
⊢ yn a1 m < yn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m < yn a1 (n + 1)

tactic: simp
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m < yn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m < xn a1 n + yn a1 n * a

tactic: refine lt_of_le_of_lt ?_ (Nat.lt_add_of_pos_left <| x_pos a1 n)
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m < xn a1 n + yn a1 n * a
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m ≤ yn a1 n * a

tactic: rw [← mul_one (yn a1 m)]
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m ≤ yn a1 n * a
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m * 1 ≤ yn a1 n * a

tactic: exact mul_le_mul this (le_of_lt a1) (Nat.zero_le _) (Nat.zero_le _)
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : yn a1 m ≤ yn a1 n
⊢ yn a1 m * 1 ≤ yn a1 n * a
state_after: no goals

tactic: rw [e]
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
e : m = n
⊢ yn a1 m ≤ yn a1 n
state_after: no goals
Theorem: zorn_nonempty_Ici₀
File: Mathlib/Order/Zorn.lean

tactic: let ⟨m, _, hxm, hm⟩ := zorn_nonempty_preorder₀ (Ici a) (fun c hca hc y hy ↦ ?_) x hax
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
c : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
⊢ ∃ m, x ≤ m ∧ ∀ (z : α), m ≤ z → z ≤ m
state_after: case refine_2
α : Type u_1
β : Type u_2
r : α → α → Prop
c : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
m : α
left✝ : m ∈ Ici a
hxm : x ≤ m
hm : ∀ z ∈ Ici a, m ≤ z → z ≤ m
⊢ ∃ m, x ≤ m ∧ ∀ (z : α), m ≤ z → z ≤ m

case refine_1
α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
c : Set α
hca : c ⊆ Ici a
hc : IsChain (fun x x_1 => x ≤ x_1) c
y : α
hy : y ∈ c
⊢ ∃ ub ∈ Ici a, ∀ z ∈ c, z ≤ ub

tactic: exact ⟨m, hxm, fun z hmz => hm _ (hax.trans <| hxm.trans hmz) hmz⟩
state_before: case refine_2
α : Type u_1
β : Type u_2
r : α → α → Prop
c : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
m : α
left✝ : m ∈ Ici a
hxm : x ≤ m
hm : ∀ z ∈ Ici a, m ≤ z → z ≤ m
⊢ ∃ m, x ≤ m ∧ ∀ (z : α), m ≤ z → z ≤ m
state_after: no goals

tactic: have ⟨ub, hub⟩ := ih c hca hc y hy
state_before: case refine_1
α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
c : Set α
hca : c ⊆ Ici a
hc : IsChain (fun x x_1 => x ≤ x_1) c
y : α
hy : y ∈ c
⊢ ∃ ub ∈ Ici a, ∀ z ∈ c, z ≤ ub
state_after: case refine_1
α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
c : Set α
hca : c ⊆ Ici a
hc : IsChain (fun x x_1 => x ≤ x_1) c
y : α
hy : y ∈ c
ub : α
hub : ∀ z ∈ c, z ≤ ub
⊢ ∃ ub ∈ Ici a, ∀ z ∈ c, z ≤ ub

tactic: exact ⟨ub, (hca hy).trans (hub y hy), hub⟩
state_before: case refine_1
α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
a : α
ih : ∀ c ⊆ Ici a, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub
x : α
hax : a ≤ x
c : Set α
hca : c ⊆ Ici a
hc : IsChain (fun x x_1 => x ≤ x_1) c
y : α
hy : y ∈ c
ub : α
hub : ∀ z ∈ c, z ≤ ub
⊢ ∃ ub ∈ Ici a, ∀ z ∈ c, z ≤ ub
state_after: no goals
Theorem: orderOf_dvd_iff_pow_eq_one
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rw [← pow_mod_orderOf, Nat.mod_eq_zero_of_dvd h, _root_.pow_zero]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : Monoid G
a b x y : G
n✝ m n : ℕ
h : orderOf x ∣ n
⊢ x ^ n = 1
state_after: no goals
Theorem: LieAlgebra.solvable_iff_equiv_solvable
File: Mathlib/Algebra/Lie/Solvable.lean

tactic: constructor <;> intro h
state_before: R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
e : L' ≃ₗ⁅R⁆ L
⊢ IsSolvable R L' ↔ IsSolvable R L
state_after: case mp
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
e : L' ≃ₗ⁅R⁆ L
h : IsSolvable R L'
⊢ IsSolvable R L

case mpr
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
e : L' ≃ₗ⁅R⁆ L
h : IsSolvable R L
⊢ IsSolvable R L'

tactic: exact e.symm.injective.lieAlgebra_isSolvable
state_before: case mp
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
e : L' ≃ₗ⁅R⁆ L
h : IsSolvable R L'
⊢ IsSolvable R L
state_after: no goals

tactic: exact e.injective.lieAlgebra_isSolvable
state_before: case mpr
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
e : L' ≃ₗ⁅R⁆ L
h : IsSolvable R L
⊢ IsSolvable R L'
state_after: no goals