1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Rat.divInt_eq_iff
File: .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean

tactic: rcases Int.eq_nat_or_neg d₁ with ⟨_, rfl | rfl⟩ <;>
rcases Int.eq_nat_or_neg d₂ with ⟨_, rfl | rfl⟩ <;>
simp_all [divInt_neg', Int.ofNat_eq_zero, Int.neg_eq_zero,
  mkRat_eq_iff, Int.neg_mul, Int.mul_neg, Int.eq_neg_comm, eq_comm]
state_before: d₁ d₂ n₁ n₂ : Int
z₁ : d₁ ≠ 0
z₂ : d₂ ≠ 0
⊢ n₁ /. d₁ = n₂ /. d₂ ↔ n₁ * d₂ = n₂ * d₁
state_after: no goals
Theorem: SupBotHom.cancel_left
File: Mathlib/Order/Hom/Lattice.lean

tactic: rw [← comp_apply, h, comp_apply]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁸ : FunLike F α β
inst✝⁷ : Sup α
inst✝⁶ : Bot α
inst✝⁵ : Sup β
inst✝⁴ : Bot β
inst✝³ : Sup γ
inst✝² : Bot γ
inst✝¹ : Sup δ
inst✝ : Bot δ
g : SupBotHom β γ
f₁ f₂ : SupBotHom α β
hg : Injective ⇑g
h : g.comp f₁ = g.comp f₂
a : α
⊢ g (f₁ a) = g (f₂ a)
state_after: no goals
Theorem: MvPolynomial.mapEquiv_trans
File: Mathlib/Algebra/MvPolynomial/Equiv.lean

tactic: simp only [RingEquiv.coe_trans, comp_apply, mapEquiv_apply, RingEquiv.coe_ringHom_trans,
  map_map]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e✝ : ℕ
s : σ →₀ ℕ
inst✝³ : CommSemiring R
inst✝² : CommSemiring S₁
inst✝¹ : CommSemiring S₂
inst✝ : CommSemiring S₃
e : S₁ ≃+* S₂
f : S₂ ≃+* S₃
p : MvPolynomial σ S₁
⊢ ((mapEquiv σ e).trans (mapEquiv σ f)) p = (mapEquiv σ (e.trans f)) p
state_after: no goals
Theorem: Vector.map_snoc
File: Mathlib/Data/Vector/Snoc.lean

tactic: induction xs <;> simp_all
state_before: α : Type u_2
n : ℕ
xs : Vector α n
α✝ : Type u_1
f : α → α✝
x : α
⊢ map f (xs.snoc x) = (map f xs).snoc (f x)
state_after: no goals
Theorem: groupCohomology.oneCocycles_map_one
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

tactic: have := (mem_oneCocycles_def f.1).1 f.2 1 1
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
f : ↥(oneCocycles A)
⊢ ↑f 1 = 0
state_after: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
f : ↥(oneCocycles A)
this : (A.ρ 1) (↑f 1) - ↑f (1 * 1) + ↑f 1 = 0
⊢ ↑f 1 = 0

tactic: simpa only [map_one, LinearMap.one_apply, mul_one, sub_self, zero_add] using this
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
f : ↥(oneCocycles A)
this : (A.ρ 1) (↑f 1) - ↑f (1 * 1) + ↑f 1 = 0
⊢ ↑f 1 = 0
state_after: no goals
Theorem: CochainComplex.mappingCone.δ_liftCochain
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

tactic: omega
state_before: C : Type u_1
inst✝² : Category.{?u.185881, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
m' : ℤ
hm' : m + 1 = m'
⊢ m' + -1 = m
state_after: no goals

tactic: dsimp only [liftCochain]
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
m' : ℤ
hm' : m + 1 = m'
⊢ δ n m (liftCochain φ α β h) =
    -(δ m m' α).comp (inl φ) ⋯ + (δ n m β + α.comp (Cochain.ofHom φ) ⋯).comp (Cochain.ofHom (inr φ)) ⋯
state_after: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
m' : ℤ
hm' : m + 1 = m'
⊢ δ n m (α.comp (inl φ) ⋯ + β.comp (Cochain.ofHom (inr φ)) ⋯) =
    -(δ m m' α).comp (inl φ) ⋯ + (δ n m β + α.comp (Cochain.ofHom φ) ⋯).comp (Cochain.ofHom (inr φ)) ⋯

tactic: simp only [δ_add, δ_comp α (inl φ) _ m' _ _ h hm' (neg_add_self 1),
  δ_comp_zero_cochain _ _ _ h, δ_inl, Cochain.ofHom_comp,
  Int.negOnePow_neg, Int.negOnePow_one, Units.neg_smul, one_smul,
  δ_ofHom, Cochain.comp_zero, zero_add, Cochain.add_comp,
  Cochain.comp_assoc_of_second_is_zero_cochain]
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
m' : ℤ
hm' : m + 1 = m'
⊢ δ n m (α.comp (inl φ) ⋯ + β.comp (Cochain.ofHom (inr φ)) ⋯) =
    -(δ m m' α).comp (inl φ) ⋯ + (δ n m β + α.comp (Cochain.ofHom φ) ⋯).comp (Cochain.ofHom (inr φ)) ⋯
state_after: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
m' : ℤ
hm' : m + 1 = m'
⊢ α.comp ((Cochain.ofHom φ).comp (Cochain.ofHom (inr φ)) ⋯) ⋯ + -(δ m m' α).comp (inl φ) ⋯ +
      (δ n m β).comp (Cochain.ofHom (inr φ)) ⋯ =
    -(δ m m' α).comp (inl φ) ⋯ +
      ((δ n m β).comp (Cochain.ofHom (inr φ)) ⋯ + α.comp ((Cochain.ofHom φ).comp (Cochain.ofHom (inr φ)) ⋯) ⋯)

tactic: abel
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
m' : ℤ
hm' : m + 1 = m'
⊢ α.comp ((Cochain.ofHom φ).comp (Cochain.ofHom (inr φ)) ⋯) ⋯ + -(δ m m' α).comp (inl φ) ⋯ +
      (δ n m β).comp (Cochain.ofHom (inr φ)) ⋯ =
    -(δ m m' α).comp (inl φ) ⋯ +
      ((δ n m β).comp (Cochain.ofHom (inr φ)) ⋯ + α.comp ((Cochain.ofHom φ).comp (Cochain.ofHom (inr φ)) ⋯) ⋯)
state_after: no goals
Theorem: Nat.fib_two_mul_add_two
File: Mathlib/Data/Nat/Fib/Basic.lean

tactic: rw [fib_add_two, fib_two_mul, fib_two_mul_add_one]
state_before: n : ℕ
⊢ fib (2 * n + 2) = fib (n + 1) * (2 * fib n + fib (n + 1))
state_after: n : ℕ
⊢ fib n * (2 * fib (n + 1) - fib n) + (fib (n + 1) ^ 2 + fib n ^ 2) = fib (n + 1) * (2 * fib n + fib (n + 1))

tactic: have : fib n ≤ 2 * fib (n + 1) :=
  le_trans fib_le_fib_succ (mul_comm 2 _ ▸ Nat.le_mul_of_pos_right _ two_pos)
state_before: n : ℕ
⊢ fib n * (2 * fib (n + 1) - fib n) + (fib (n + 1) ^ 2 + fib n ^ 2) = fib (n + 1) * (2 * fib n + fib (n + 1))
state_after: n : ℕ
this : fib n ≤ 2 * fib (n + 1)
⊢ fib n * (2 * fib (n + 1) - fib n) + (fib (n + 1) ^ 2 + fib n ^ 2) = fib (n + 1) * (2 * fib n + fib (n + 1))

tactic: zify [this]
state_before: n : ℕ
this : fib n ≤ 2 * fib (n + 1)
⊢ fib n * (2 * fib (n + 1) - fib n) + (fib (n + 1) ^ 2 + fib n ^ 2) = fib (n + 1) * (2 * fib n + fib (n + 1))
state_after: n : ℕ
this : fib n ≤ 2 * fib (n + 1)
⊢ ↑(fib n) * (2 * ↑(fib (n + 1)) - ↑(fib n)) + (↑(fib (n + 1)) ^ 2 + ↑(fib n) ^ 2) =
    ↑(fib (n + 1)) * (2 * ↑(fib n) + ↑(fib (n + 1)))

tactic: ring
state_before: n : ℕ
this : fib n ≤ 2 * fib (n + 1)
⊢ ↑(fib n) * (2 * ↑(fib (n + 1)) - ↑(fib n)) + (↑(fib (n + 1)) ^ 2 + ↑(fib n) ^ 2) =
    ↑(fib (n + 1)) * (2 * ↑(fib n) + ↑(fib (n + 1)))
state_after: no goals
Theorem: Metric.exists_mem_closure_infDist_eq_dist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simpa only [infDist_closure] using isClosed_closure.exists_infDist_eq_dist hne.closure x
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
s t u : Set α
x✝ y : α
Φ : α → β
inst✝ : ProperSpace α
hne : s.Nonempty
x : α
⊢ ∃ y ∈ closure s, infDist x s = dist x y
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.addY_self
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: erw [addY, addX_self hP, negAddY_self, addZ_self, negY_of_Z_eq_zero rfl, neg_zero]
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → R
hP : W'.Equation P
⊢ W'.addY P P = 0
state_after: no goals
Theorem: Set.IsPWO.mul
File: Mathlib/Data/Finset/MulAntidiagonal.lean

tactic: rw [← image_mul_prod]
state_before: α : Type u_1
s t : Set α
inst✝ : OrderedCancelCommMonoid α
hs : s.IsPWO
ht : t.IsPWO
⊢ (s * t).IsPWO
state_after: α : Type u_1
s t : Set α
inst✝ : OrderedCancelCommMonoid α
hs : s.IsPWO
ht : t.IsPWO
⊢ ((fun x => x.1 * x.2) '' s ×ˢ t).IsPWO

tactic: exact (hs.prod ht).image_of_monotone (monotone_fst.mul' monotone_snd)
state_before: α : Type u_1
s t : Set α
inst✝ : OrderedCancelCommMonoid α
hs : s.IsPWO
ht : t.IsPWO
⊢ ((fun x => x.1 * x.2) '' s ×ˢ t).IsPWO
state_after: no goals
Theorem: ClassGroup.equiv_mk0
File: Mathlib/RingTheory/ClassGroup.lean

tactic: rw [ClassGroup.mk0, MonoidHom.comp_apply, ClassGroup.equiv_mk]
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
I : ↥(Ideal R)⁰
⊢ (equiv K) (mk0 I) = (QuotientGroup.mk' (toPrincipalIdeal R K).range) ((FractionalIdeal.mk0 K) I)
state_after: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
I : ↥(Ideal R)⁰
⊢ (QuotientGroup.mk' (toPrincipalIdeal R K).range)
      ((Units.mapEquiv ↑(canonicalEquiv R⁰ (FractionRing R) K)) ((FractionalIdeal.mk0 (FractionRing R)) I)) =
    (QuotientGroup.mk' (toPrincipalIdeal R K).range) ((FractionalIdeal.mk0 K) I)

tactic: congr 1
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
I : ↥(Ideal R)⁰
⊢ (QuotientGroup.mk' (toPrincipalIdeal R K).range)
      ((Units.mapEquiv ↑(canonicalEquiv R⁰ (FractionRing R) K)) ((FractionalIdeal.mk0 (FractionRing R)) I)) =
    (QuotientGroup.mk' (toPrincipalIdeal R K).range) ((FractionalIdeal.mk0 K) I)
state_after: case h.e_6.h
R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
I : ↥(Ideal R)⁰
⊢ (Units.mapEquiv ↑(canonicalEquiv R⁰ (FractionRing R) K)) ((FractionalIdeal.mk0 (FractionRing R)) I) =
    (FractionalIdeal.mk0 K) I

tactic: simp [← Units.eq_iff]
state_before: case h.e_6.h
R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
I : ↥(Ideal R)⁰
⊢ (Units.mapEquiv ↑(canonicalEquiv R⁰ (FractionRing R) K)) ((FractionalIdeal.mk0 (FractionRing R)) I) =
    (FractionalIdeal.mk0 K) I
state_after: no goals
Theorem: Equiv.Perm.IsCycle.swap_mul
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: simp [swap_apply_def, mul_apply, if_neg hffx, f.injective.eq_iff, if_neg hx, hx]
state_before: ι : Type u_1
α✝ : Type u_2
β : Type u_3
f✝ g : Perm α✝
x✝ y : α✝
inst✝² : DecidableEq α✝
inst✝¹ : Fintype α✝
α : Type u_4
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
x : α
hx : f x ≠ x
hffx : f (f x) ≠ x
⊢ (swap x (f x) * f) (f x) ≠ f x
state_after: no goals

tactic: simp
state_before: ι : Type u_1
α✝ : Type u_2
β : Type u_3
f✝ g : Perm α✝
x✝ y✝ : α✝
inst✝² : DecidableEq α✝
inst✝¹ : Fintype α✝
α : Type u_4
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
x : α
hx : f x ≠ x
hffx : f (f x) ≠ x
y : α
hy : (swap x (f x) * f) y ≠ y
i : ℤ
hi : (f ^ i) x = y
⊢ (f ^ (i - 1)) (f x) = (f ^ (i - 1) * f ^ 1) x
state_after: no goals

tactic: rwa [← zpow_add, sub_add_cancel]
state_before: ι : Type u_1
α✝ : Type u_2
β : Type u_3
f✝ g : Perm α✝
x✝ y✝ : α✝
inst✝² : DecidableEq α✝
inst✝¹ : Fintype α✝
α : Type u_4
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
x : α
hx : f x ≠ x
hffx : f (f x) ≠ x
y : α
hy : (swap x (f x) * f) y ≠ y
i : ℤ
hi : (f ^ i) x = y
⊢ (f ^ (i - 1) * f ^ 1) x = y
state_after: no goals
Theorem: CategoryTheory.PreGaloisCategory.lt_card_fiber_of_mono_of_notIso
File: Mathlib/CategoryTheory/Galois/Basic.lean

tactic: by_contra hlt
state_before: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
⊢ Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
state_after: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : ¬Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
⊢ False

tactic: apply h
state_before: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : ¬Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
⊢ False
state_after: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : ¬Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
⊢ IsIso f

tactic: apply isIso_of_mono_of_eq_card_fiber F f
state_before: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : ¬Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
⊢ IsIso f
state_after: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : ¬Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
⊢ Nat.card ↑(F.obj X) = Nat.card ↑(F.obj Y)

tactic: simp only [gt_iff_lt, not_lt] at hlt
state_before: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : ¬Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)
⊢ Nat.card ↑(F.obj X) = Nat.card ↑(F.obj Y)
state_after: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : Nat.card ↑(F.obj Y) ≤ Nat.card ↑(F.obj X)
⊢ Nat.card ↑(F.obj X) = Nat.card ↑(F.obj Y)

tactic: exact Nat.le_antisymm
  (Finite.card_le_of_injective (F.map f) (injective_of_mono_of_preservesPullback (F.map f))) hlt
state_before: C : Type u₁
inst✝³ : Category.{u₂, u₁} C
inst✝² : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝¹ : FiberFunctor F
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : ¬IsIso f
hlt : Nat.card ↑(F.obj Y) ≤ Nat.card ↑(F.obj X)
⊢ Nat.card ↑(F.obj X) = Nat.card ↑(F.obj Y)
state_after: no goals
Theorem: Bool.lt_iff
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ {x y : Bool}, x < y ↔ x = false ∧ y = true
state_after: no goals
Theorem: LaurentPolynomial.commute_T
File: Mathlib/Algebra/Polynomial/Laurent.lean

tactic: rw [T, T, ← single_eq_C, single_mul_single, single_mul_single, single_mul_single]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℤ
f : R[T;T⁻¹]
m : ℤ
a : R
⊢ T n * (C a * T m) = C a * T m * T n
state_after: R : Type u_1
inst✝ : Semiring R
n : ℤ
f : R[T;T⁻¹]
m : ℤ
a : R
⊢ AddMonoidAlgebra.single (n + (0 + m)) (1 * (a * 1)) = AddMonoidAlgebra.single (0 + m + n) (a * 1 * 1)

tactic: simp [add_comm]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℤ
f : R[T;T⁻¹]
m : ℤ
a : R
⊢ AddMonoidAlgebra.single (n + (0 + m)) (1 * (a * 1)) = AddMonoidAlgebra.single (0 + m + n) (a * 1 * 1)
state_after: no goals
Theorem: List.getElem_indexOf
File: Mathlib/Data/List/Basic.lean

tactic: by_cases h' : b = a <;>
simp [h', if_pos, if_false, getElem_indexOf]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
h : indexOf a (b :: l) < (b :: l).length
⊢ (b :: l)[indexOf a (b :: l)] = a
state_after: no goals
Theorem: TopologicalSpace.ext_iff_isClosed
File: Mathlib/Topology/Basic.lean

tactic: rw [TopologicalSpace.ext_iff, compl_surjective.forall]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ t₁ t₂ : TopologicalSpace X
⊢ t₁ = t₂ ↔ ∀ (s : Set X), IsClosed s ↔ IsClosed s
state_after: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ t₁ t₂ : TopologicalSpace X
⊢ (∀ (x : Set X), IsOpen xᶜ ↔ IsOpen xᶜ) ↔ ∀ (s : Set X), IsClosed s ↔ IsClosed s

tactic: simp only [@isOpen_compl_iff _ _ t₁, @isOpen_compl_iff _ _ t₂]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ t₁ t₂ : TopologicalSpace X
⊢ (∀ (x : Set X), IsOpen xᶜ ↔ IsOpen xᶜ) ↔ ∀ (s : Set X), IsClosed s ↔ IsClosed s
state_after: no goals
Theorem: CategoryTheory.Abelian.mono_inl_of_factor_thru_epi_mono_factorization
File: Mathlib/CategoryTheory/Abelian/Basic.lean

tactic: apply mono_inl_of_isColimit _ _ (PushoutCocone.isColimitOfFactors _ _ _ _ _ hf hg t ht)
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : Abelian C
inst✝² : HasPushouts C
W X Y Z : C
f✝ : X ⟶ Y
g✝ : X ⟶ Z
f : X ⟶ Y
g : X ⟶ Z
g₁ : X ⟶ W
inst✝¹ : Epi g₁
g₂ : W ⟶ Z
inst✝ : Mono g₂
hg : g₁ ≫ g₂ = g
f' : W ⟶ Y
hf : g₁ ≫ f' = f
t : PushoutCocone f g
ht : IsColimit t
⊢ Mono t.inl
state_after: no goals
Theorem: Finset.card_insertNone
File: Mathlib/Data/Finset/Option.lean

tactic: simp [insertNone]
state_before: α : Type u_1
β : Type u_2
s : Finset α
⊢ (insertNone s).card = s.card + 1
state_after: no goals
Theorem: Submodule.biInf_comap_proj
File: Mathlib/LinearAlgebra/Pi.lean

tactic: ext x
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝² : Semiring R
φ : ι → Type u_1
inst✝¹ : (i : ι) → AddCommMonoid (φ i)
inst✝ : (i : ι) → Module R (φ i)
I : Set ι
p q : (i : ι) → Submodule R (φ i)
x : (i : ι) → φ i
⊢ ⨅ i ∈ I, comap (proj i) (p i) = pi I p
state_after: case h
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝² : Semiring R
φ : ι → Type u_1
inst✝¹ : (i : ι) → AddCommMonoid (φ i)
inst✝ : (i : ι) → Module R (φ i)
I : Set ι
p q : (i : ι) → Submodule R (φ i)
x✝ x : (i : ι) → φ i
⊢ x ∈ ⨅ i ∈ I, comap (proj i) (p i) ↔ x ∈ pi I p

tactic: simp
state_before: case h
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝² : Semiring R
φ : ι → Type u_1
inst✝¹ : (i : ι) → AddCommMonoid (φ i)
inst✝ : (i : ι) → Module R (φ i)
I : Set ι
p q : (i : ι) → Submodule R (φ i)
x✝ x : (i : ι) → φ i
⊢ x ∈ ⨅ i ∈ I, comap (proj i) (p i) ↔ x ∈ pi I p
state_after: no goals
Theorem: Associates.prod_le_prod
File: Mathlib/Algebra/BigOperators/Associated.lean

tactic: haveI := Classical.decEq (Associates α)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
⊢ p.prod ≤ q.prod
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this : DecidableEq (Associates α)
⊢ p.prod ≤ q.prod

tactic: haveI := Classical.decEq α
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this : DecidableEq (Associates α)
⊢ p.prod ≤ q.prod
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ p.prod ≤ q.prod

tactic: suffices p.prod ≤ (p + (q - p)).prod by rwa [add_tsub_cancel_of_le h] at this
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ p.prod ≤ q.prod
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ p.prod ≤ (p + (q - p)).prod

tactic: suffices p.prod * 1 ≤ p.prod * (q - p).prod by simpa
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ p.prod ≤ (p + (q - p)).prod
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ p.prod * 1 ≤ p.prod * (q - p).prod

tactic: exact mul_mono (le_refl p.prod) one_le
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ p.prod * 1 ≤ p.prod * (q - p).prod
state_after: no goals

tactic: rwa [add_tsub_cancel_of_le h] at this
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝¹ : DecidableEq (Associates α)
this✝ : DecidableEq α
this : p.prod ≤ (p + (q - p)).prod
⊢ p.prod ≤ q.prod
state_after: no goals

tactic: simpa
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝¹ : DecidableEq (Associates α)
this✝ : DecidableEq α
this : p.prod * 1 ≤ p.prod * (q - p).prod
⊢ p.prod ≤ (p + (q - p)).prod
state_after: no goals