1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Function.le_of_lt_minimalPeriod_of_iterate_eq
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: by_contra! hmn'
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m] x = f^[n] x
⊢ m ≤ n
state_after: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m] x = f^[n] x
hmn' : n < m
⊢ False

tactic: rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m] x = f^[n] x
hmn' : n < m
⊢ False
state_after: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m - n] (f^[n] x) = f^[n] x
hmn' : n < m
⊢ False

tactic: exact
  ((IsPeriodicPt.minimalPeriod_le (tsub_pos_of_lt hmn')
            (isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate
              (minimalPeriod_pos_iff_mem_periodicPts.1 ((zero_le m).trans_lt hm)) hmn)).trans
        (Nat.sub_le m n)).not_lt
    hm
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m - n] (f^[n] x) = f^[n] x
hmn' : n < m
⊢ False
state_after: no goals
Theorem: Option.bnot_comp_isNone
File: Mathlib/Data/Option/Basic.lean

tactic: funext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
⊢ (fun x => !x) ∘ isNone = isSome
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
x : Option α
⊢ ((fun x => !x) ∘ isNone) x = x.isSome

tactic: simp
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
x : Option α
⊢ ((fun x => !x) ∘ isNone) x = x.isSome
state_after: no goals
Theorem: HomotopyCategory.quasiIso_eq_subcategoryAcyclic_W
File: Mathlib/Algebra/Homology/DerivedCategory/Basic.lean

tactic: ext K L f
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
⊢ quasiIso C (ComplexShape.up ℤ) = (subcategoryAcyclic C).W
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K L : HomotopyCategory C (ComplexShape.up ℤ)
f : K ⟶ L
⊢ quasiIso C (ComplexShape.up ℤ) f ↔ (subcategoryAcyclic C).W f

tactic: exact ((homologyFunctor C (ComplexShape.up ℤ) 0).mem_homologicalKernel_W_iff f).symm
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K L : HomotopyCategory C (ComplexShape.up ℤ)
f : K ⟶ L
⊢ quasiIso C (ComplexShape.up ℤ) f ↔ (subcategoryAcyclic C).W f
state_after: no goals
Theorem: EuclideanDomain.dvd_mod_iff
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rw [← dvd_add_right (h.mul_right _), div_add_mod]
state_before: R : Type u
inst✝ : EuclideanDomain R
a b c : R
h : c ∣ b
⊢ c ∣ a % b ↔ c ∣ a
state_after: no goals
Theorem: AffineSubspace.perpBisector_ne_bot
File: Mathlib/Geometry/Euclidean/PerpBisector.lean

tactic: rw [← nonempty_iff_ne_bot]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
c c₁ c₂ p₁ p₂ : P
⊢ perpBisector p₁ p₂ ≠ ⊥
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
c c₁ c₂ p₁ p₂ : P
⊢ (↑(perpBisector p₁ p₂)).Nonempty

tactic: exact perpBisector_nonempty
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
c c₁ c₂ p₁ p₂ : P
⊢ (↑(perpBisector p₁ p₂)).Nonempty
state_after: no goals
Theorem: MeasureTheory.AEEqFun.le_sup_right
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

tactic: rw [← coeFn_le]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
⊢ g ≤ f ⊔ g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
⊢ ↑g ≤ᶠ[ae μ] ↑(f ⊔ g)

tactic: filter_upwards [coeFn_sup f g] with _ ha
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
⊢ ↑g ≤ᶠ[ae μ] ↑(f ⊔ g)
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑(f ⊔ g) a✝

tactic: rw [ha]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑(f ⊔ g) a✝
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑f a✝ ⊔ ↑g a✝

tactic: exact le_sup_right
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑f a✝ ⊔ ↑g a✝
state_after: no goals
Theorem: Ideal.IsMaximal.coprime_of_ne
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: contrapose! hne with h
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
M M' : Ideal α
hM : M.IsMaximal
hM' : M'.IsMaximal
hne : M ≠ M'
⊢ M ⊔ M' = ⊤
state_after: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
M M' : Ideal α
hM : M.IsMaximal
hM' : M'.IsMaximal
h : M ⊔ M' ≠ ⊤
⊢ M = M'

tactic: exact hM.eq_of_le hM'.ne_top (le_sup_left.trans_eq (hM'.eq_of_le h le_sup_right).symm)
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
M M' : Ideal α
hM : M.IsMaximal
hM' : M'.IsMaximal
h : M ⊔ M' ≠ ⊤
⊢ M = M'
state_after: no goals
Theorem: Equiv.Perm.cycleFactorsFinset_eq_empty_iff
File: Mathlib/GroupTheory/Perm/Cycle/Factors.lean

tactic: simpa [cycleFactorsFinset_eq_finset] using eq_comm
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f : Perm α
⊢ f.cycleFactorsFinset = ∅ ↔ f = 1
state_after: no goals
Theorem: LowerSet.disjoint_coe
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp [disjoint_iff, SetLike.ext'_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
⊢ Disjoint ↑s ↑t ↔ Disjoint s t
state_after: no goals
Theorem: Fin.succAbove_pos
File: Mathlib/Data/Fin/Basic.lean

tactic: by_cases H : castSucc i < p
state_before: n m : ℕ
p✝ : Fin (n + 1)
i✝ j : Fin n
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
⊢ 0 < p.succAbove i
state_after: case pos
n m : ℕ
p✝ : Fin (n + 1)
i✝ j : Fin n
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
H : i.castSucc < p
⊢ 0 < p.succAbove i

case neg
n m : ℕ
p✝ : Fin (n + 1)
i✝ j : Fin n
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
H : ¬i.castSucc < p
⊢ 0 < p.succAbove i

tactic: simpa [succAbove_of_castSucc_lt _ _ H] using castSucc_pos' h
state_before: case pos
n m : ℕ
p✝ : Fin (n + 1)
i✝ j : Fin n
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
H : i.castSucc < p
⊢ 0 < p.succAbove i
state_after: no goals

tactic: simp [succAbove_of_le_castSucc _ _ (Fin.not_lt.1 H)]
state_before: case neg
n m : ℕ
p✝ : Fin (n + 1)
i✝ j : Fin n
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
H : ¬i.castSucc < p
⊢ 0 < p.succAbove i
state_after: no goals
Theorem: LowerSet.mem_iSup_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: rw [← SetLike.mem_coe, coe_iSup]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
f : ι → LowerSet α
⊢ a ∈ ⨆ i, f i ↔ ∃ i, a ∈ f i
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
f : ι → LowerSet α
⊢ a ∈ ⋃ i, ↑(f i) ↔ ∃ i, a ∈ f i

tactic: exact mem_iUnion
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
f : ι → LowerSet α
⊢ a ∈ ⋃ i, ↑(f i) ↔ ∃ i, a ∈ f i
state_after: no goals
Theorem: Nat.base_pow_length_digits_le'
File: Mathlib/Data/Nat/Digits.lean

tactic: have : digits (b + 2) m ≠ [] := digits_ne_nil_iff_ne_zero.mpr hm
state_before: n b m : ℕ
hm : m ≠ 0
⊢ (b + 2) ^ ((b + 2).digits m).length ≤ (b + 2) * m
state_after: n b m : ℕ
hm : m ≠ 0
this : (b + 2).digits m ≠ []
⊢ (b + 2) ^ ((b + 2).digits m).length ≤ (b + 2) * m

tactic: convert @pow_length_le_mul_ofDigits b (digits (b+2) m)
  this (getLast_digit_ne_zero _ hm)
state_before: n b m : ℕ
hm : m ≠ 0
this : (b + 2).digits m ≠ []
⊢ (b + 2) ^ ((b + 2).digits m).length ≤ (b + 2) * m
state_after: case h.e'_4.h.e'_6
n b m : ℕ
hm : m ≠ 0
this : (b + 2).digits m ≠ []
⊢ m = ofDigits (b + 2) ((b + 2).digits m)

tactic: rw [ofDigits_digits]
state_before: case h.e'_4.h.e'_6
n b m : ℕ
hm : m ≠ 0
this : (b + 2).digits m ≠ []
⊢ m = ofDigits (b + 2) ((b + 2).digits m)
state_after: no goals
Theorem: le_map_add_map_div'
File: Mathlib/Algebra/Order/Hom/Basic.lean

tactic: simpa only [add_comm, map_div_rev, div_mul_cancel] using map_mul_le_add f (x / y) y
state_before: ι : Type u_1
F : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : FunLike F α β
inst✝² : Group α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : GroupSeminormClass F α β
f : F
x y : α
⊢ f x ≤ f y + f (y / x)
state_after: no goals
Theorem: MulChar.pow_apply'
File: Mathlib/NumberTheory/MulChar/Basic.lean

tactic: by_cases ha : IsUnit a
state_before: R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : n ≠ 0
a : R
⊢ (χ ^ n) a = χ a ^ n
state_after: case pos
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : n ≠ 0
a : R
ha : IsUnit a
⊢ (χ ^ n) a = χ a ^ n

case neg
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : n ≠ 0
a : R
ha : ¬IsUnit a
⊢ (χ ^ n) a = χ a ^ n

tactic: exact pow_apply_coe χ n ha.unit
state_before: case pos
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : n ≠ 0
a : R
ha : IsUnit a
⊢ (χ ^ n) a = χ a ^ n
state_after: no goals

tactic: rw [map_nonunit (χ ^ n) ha, map_nonunit χ ha, zero_pow hn]
state_before: case neg
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : n ≠ 0
a : R
ha : ¬IsUnit a
⊢ (χ ^ n) a = χ a ^ n
state_after: no goals
Theorem: Nat.eq_pow_of_factorization_eq_single
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rw [← Nat.factorization_prod_pow_eq_self hn, h, Finsupp.prod_single_index]
state_before: a b m n✝ p✝ n p k : ℕ
hn : n ≠ 0
h : n.factorization = single p k
⊢ n = p ^ k
state_after: a b m n✝ p✝ n p k : ℕ
hn : n ≠ 0
h : n.factorization = single p k
⊢ p ^ 0 = 1

tactic: simp
state_before: a b m n✝ p✝ n p k : ℕ
hn : n ≠ 0
h : n.factorization = single p k
⊢ p ^ 0 = 1
state_after: no goals
Theorem: WeierstrassCurve.natDegree_ΨSq_le
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: induction n using Int.negInduction with
| nat n => exact (W.natDegree_coeff_ΨSq_ofNat n).left
| neg => rwa [ΨSq_neg, Int.natAbs_neg]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℤ
⊢ (W.ΨSq n).natDegree ≤ n.natAbs ^ 2 - 1
state_after: no goals

tactic: exact (W.natDegree_coeff_ΨSq_ofNat n).left
state_before: case nat
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℕ
⊢ (W.ΨSq ↑n).natDegree ≤ (↑n).natAbs ^ 2 - 1
state_after: no goals

tactic: rwa [ΨSq_neg, Int.natAbs_neg]
state_before: case neg
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n✝ : ℕ
a✝ : (W.ΨSq ↑n✝).natDegree ≤ (↑n✝).natAbs ^ 2 - 1
⊢ (W.ΨSq (-↑n✝)).natDegree ≤ (-↑n✝).natAbs ^ 2 - 1
state_after: no goals
Theorem: LinearMap.BilinForm.coe_injective
File: Mathlib/LinearAlgebra/BilinearForm/Basic.lean

tactic: ext x y
state_before: R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
S : Type u_3
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra S R
inst✝⁷ : Module S M
inst✝⁶ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝⁵ : CommRing R₁
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R₁ M₁
V : Type u_6
K : Type u_7
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
D✝ : BilinForm R M
D₁ : BilinForm R₁ M₁
B D : BilinForm R M
h : (fun B x y => (B x) y) B = (fun B x y => (B x) y) D
⊢ B = D
state_after: case h.h
R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
S : Type u_3
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra S R
inst✝⁷ : Module S M
inst✝⁶ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝⁵ : CommRing R₁
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R₁ M₁
V : Type u_6
K : Type u_7
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
D✝ : BilinForm R M
D₁ : BilinForm R₁ M₁
B D : BilinForm R M
h : (fun B x y => (B x) y) B = (fun B x y => (B x) y) D
x y : M
⊢ (B x) y = (D x) y

tactic: apply congrFun₂ h
state_before: case h.h
R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
S : Type u_3
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra S R
inst✝⁷ : Module S M
inst✝⁶ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝⁵ : CommRing R₁
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R₁ M₁
V : Type u_6
K : Type u_7
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
D✝ : BilinForm R M
D₁ : BilinForm R₁ M₁
B D : BilinForm R M
h : (fun B x y => (B x) y) B = (fun B x y => (B x) y) D
x y : M
⊢ (B x) y = (D x) y
state_after: no goals
Theorem: Matrix.diagonal_smul
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext i j
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : DecidableEq n
inst✝¹ : Zero α
inst✝ : SMulZeroClass R α
r : R
d : n → α
⊢ diagonal (r • d) = r • diagonal d
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : DecidableEq n
inst✝¹ : Zero α
inst✝ : SMulZeroClass R α
r : R
d : n → α
i j : n
⊢ diagonal (r • d) i j = (r • diagonal d) i j

tactic: by_cases h : i = j <;> simp [h]
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : DecidableEq n
inst✝¹ : Zero α
inst✝ : SMulZeroClass R α
r : R
d : n → α
i j : n
⊢ diagonal (r • d) i j = (r • diagonal d) i j
state_after: no goals
Theorem: CategoryTheory.shiftFunctorZero_inv_app_shift
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: rw [← cancel_mono ((shiftFunctorZero C A).hom.app (X⟦n⟧)), Category.assoc, Iso.inv_hom_id_app,
  shiftFunctorZero_hom_app_shift, Iso.inv_hom_id_app_assoc, ← Functor.map_comp,
  Iso.inv_hom_id_app]
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddCommMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
n : A
⊢ (shiftFunctorZero C A).inv.app ((shiftFunctor C n).obj X) =
    (shiftFunctor C n).map ((shiftFunctorZero C A).inv.app X) ≫ (shiftFunctorComm C n 0).inv.app X
state_after: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddCommMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
n : A
⊢ 𝟙 ((𝟭 C).obj ((shiftFunctor C n).obj X)) = (shiftFunctor C n).map (𝟙 ((𝟭 C).obj X))

tactic: dsimp
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddCommMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
n : A
⊢ 𝟙 ((𝟭 C).obj ((shiftFunctor C n).obj X)) = (shiftFunctor C n).map (𝟙 ((𝟭 C).obj X))
state_after: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddCommMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
n : A
⊢ 𝟙 ((shiftFunctor C n).obj X) = (shiftFunctor C n).map (𝟙 X)

tactic: rw [Functor.map_id]
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddCommMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
n : A
⊢ 𝟙 ((shiftFunctor C n).obj X) = (shiftFunctor C n).map (𝟙 X)
state_after: no goals
Theorem: pos_and_pos_or_neg_and_neg_of_mul_pos
File: Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

tactic: rcases lt_trichotomy a 0 with (ha | rfl | ha)
state_before: α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
⊢ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0
state_after: case inl
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : a < 0
⊢ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0

case inr.inl
α : Type u_1
b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < 0 * b
⊢ 0 < 0 ∧ 0 < b ∨ 0 < 0 ∧ b < 0

case inr.inr
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : 0 < a
⊢ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0

tactic: refine Or.inr ⟨ha, lt_imp_lt_of_le_imp_le (fun hb => ?_) hab⟩
state_before: case inl
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : a < 0
⊢ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0
state_after: case inl
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : a < 0
hb : 0 ≤ b
⊢ a * b ≤ 0

tactic: exact mul_nonpos_of_nonpos_of_nonneg ha.le hb
state_before: case inl
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : a < 0
hb : 0 ≤ b
⊢ a * b ≤ 0
state_after: no goals

tactic: rw [zero_mul] at hab
state_before: case inr.inl
α : Type u_1
b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < 0 * b
⊢ 0 < 0 ∧ 0 < b ∨ 0 < 0 ∧ b < 0
state_after: case inr.inl
α : Type u_1
b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < 0
⊢ 0 < 0 ∧ 0 < b ∨ 0 < 0 ∧ b < 0

tactic: exact hab.false.elim
state_before: case inr.inl
α : Type u_1
b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < 0
⊢ 0 < 0 ∧ 0 < b ∨ 0 < 0 ∧ b < 0
state_after: no goals

tactic: refine Or.inl ⟨ha, lt_imp_lt_of_le_imp_le (fun hb => ?_) hab⟩
state_before: case inr.inr
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : 0 < a
⊢ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0
state_after: case inr.inr
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : 0 < a
hb : b ≤ 0
⊢ a * b ≤ 0

tactic: exact mul_nonpos_of_nonneg_of_nonpos ha.le hb
state_before: case inr.inr
α : Type u_1
a b c d : α
inst✝³ : MulZeroClass α
inst✝² : LinearOrder α
inst✝¹ : PosMulMono α
inst✝ : MulPosMono α
hab : 0 < a * b
ha : 0 < a
hb : b ≤ 0
⊢ a * b ≤ 0
state_after: no goals
Theorem: Finset.box_zero
File: Mathlib/Order/Interval/Finset/Box.lean

tactic: simp [box]
state_before: α : Type u_1
inst✝² : OrderedRing α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
n : ℕ
⊢ box 0 = {0}
state_after: no goals
Theorem: AddConstMapClass.map_zsmul_add
File: Mathlib/Algebra/AddConstMap/Basic.lean

tactic: rw [add_comm, map_add_zsmul]
state_before: F : Type u_1
G : Type u_2
H : Type u_3
inst✝³ : FunLike F G H
a : G
b : H
inst✝² : AddCommGroup G
inst✝¹ : AddGroup H
inst✝ : AddConstMapClass F G H a b
f : F
n : ℤ
x : G
⊢ f (n • a + x) = f x + n • b
state_after: no goals
Theorem: Setoid.quotient_mk_sInf_eq
File: Mathlib/Data/Setoid/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
S : Set (Setoid α)
x y : α
⊢ ⟦x⟧ = ⟦y⟧ ↔ ∀ s ∈ S, s.Rel x y
state_after: α : Type u_1
β : Type u_2
S : Set (Setoid α)
x y : α
⊢ x ≈ y ↔ ∀ s ∈ S, s.Rel x y

tactic: rfl
state_before: α : Type u_1
β : Type u_2
S : Set (Setoid α)
x y : α
⊢ x ≈ y ↔ ∀ s ∈ S, s.Rel x y
state_after: no goals
Theorem: CategoryTheory.ShortComplex.RightHomologyData.homologyIso_inv_comp_homologyι
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

tactic: dsimp only [homologyι, homologyIso]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝¹ : S.HasHomology
h : S.RightHomologyData
inst✝ : S.HasHomology
⊢ h.homologyIso.inv ≫ S.homologyι = h.ι ≫ h.opcyclesIso.inv
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝¹ : S.HasHomology
h : S.RightHomologyData
inst✝ : S.HasHomology
⊢ (S.rightHomologyIso.symm ≪≫ h.rightHomologyIso).inv ≫ S.rightHomologyIso.inv ≫ S.rightHomologyι =
    h.ι ≫ h.opcyclesIso.inv

tactic: simp only [Iso.trans_inv, Iso.symm_inv, assoc, Iso.hom_inv_id_assoc,
  rightHomologyIso_inv_comp_rightHomologyι]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝¹ : S.HasHomology
h : S.RightHomologyData
inst✝ : S.HasHomology
⊢ (S.rightHomologyIso.symm ≪≫ h.rightHomologyIso).inv ≫ S.rightHomologyIso.inv ≫ S.rightHomologyι =
    h.ι ≫ h.opcyclesIso.inv
state_after: no goals
Theorem: Finset.insert_compl_insert
File: Mathlib/Data/Fintype/Basic.lean

tactic: simp_rw [compl_insert, insert_erase (mem_compl.2 ha)]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
s t : Finset α
inst✝ : DecidableEq α
a : α
ha : a ∉ s
⊢ insert a (insert a s)ᶜ = sᶜ
state_after: no goals
Theorem: TrivSqZeroExt.inv_mul_cancel
File: Mathlib/Algebra/TrivSqZeroExt.lean

tactic: ext
state_before: R : Type u
M : Type v
inst✝⁴ : DivisionSemiring R
inst✝³ : AddCommGroup M
inst✝² : Module Rᵐᵒᵖ M
inst✝¹ : Module R M
inst✝ : SMulCommClass R Rᵐᵒᵖ M
x : tsze R M
hx : x.fst ≠ 0
⊢ x⁻¹ * x = 1
state_after: case h1
R : Type u
M : Type v
inst✝⁴ : DivisionSemiring R
inst✝³ : AddCommGroup M
inst✝² : Module Rᵐᵒᵖ M
inst✝¹ : Module R M
inst✝ : SMulCommClass R Rᵐᵒᵖ M
x : tsze R M
hx : x.fst ≠ 0
⊢ (x⁻¹ * x).fst = fst 1

case h2
R : Type u
M : Type v
inst✝⁴ : DivisionSemiring R
inst✝³ : AddCommGroup M
inst✝² : Module Rᵐᵒᵖ M
inst✝¹ : Module R M
inst✝ : SMulCommClass R Rᵐᵒᵖ M
x : tsze R M
hx : x.fst ≠ 0
⊢ (x⁻¹ * x).snd = snd 1

tactic: rw [fst_mul, fst_inv, inv_mul_cancel hx, fst_one]
state_before: case h1
R : Type u
M : Type v
inst✝⁴ : DivisionSemiring R
inst✝³ : AddCommGroup M
inst✝² : Module Rᵐᵒᵖ M
inst✝¹ : Module R M
inst✝ : SMulCommClass R Rᵐᵒᵖ M
x : tsze R M
hx : x.fst ≠ 0
⊢ (x⁻¹ * x).fst = fst 1
state_after: no goals

tactic: rw [snd_mul, snd_inv, snd_one, smul_neg, op_smul_op_smul, inv_mul_cancel hx, op_one, one_smul,
  fst_inv, add_right_neg]
state_before: case h2
R : Type u
M : Type v
inst✝⁴ : DivisionSemiring R
inst✝³ : AddCommGroup M
inst✝² : Module Rᵐᵒᵖ M
inst✝¹ : Module R M
inst✝ : SMulCommClass R Rᵐᵒᵖ M
x : tsze R M
hx : x.fst ≠ 0
⊢ (x⁻¹ * x).snd = snd 1
state_after: no goals