1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.natDegree_eq_of_natDegree_add_lt_left
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: by_contra h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : (p + q).natDegree < p.natDegree
⊢ p.natDegree = q.natDegree
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : (p + q).natDegree < p.natDegree
h : ¬p.natDegree = q.natDegree
⊢ False

tactic: cases Nat.lt_or_lt_of_ne h with
| inl h => exact lt_asymm h (by rwa [natDegree_add_eq_right_of_natDegree_lt h] at H)
| inr h =>
  rw [natDegree_add_eq_left_of_natDegree_lt h] at H
  exact LT.lt.false H
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : (p + q).natDegree < p.natDegree
h : ¬p.natDegree = q.natDegree
⊢ False
state_after: no goals

tactic: exact lt_asymm h (by rwa [natDegree_add_eq_right_of_natDegree_lt h] at H)
state_before: case inl
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : (p + q).natDegree < p.natDegree
h✝ : ¬p.natDegree = q.natDegree
h : p.natDegree < q.natDegree
⊢ False
state_after: no goals

tactic: rwa [natDegree_add_eq_right_of_natDegree_lt h] at H
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : (p + q).natDegree < p.natDegree
h✝ : ¬p.natDegree = q.natDegree
h : p.natDegree < q.natDegree
⊢ q.natDegree < p.natDegree
state_after: no goals

tactic: rw [natDegree_add_eq_left_of_natDegree_lt h] at H
state_before: case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : (p + q).natDegree < p.natDegree
h✝ : ¬p.natDegree = q.natDegree
h : q.natDegree < p.natDegree
⊢ False
state_after: case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : p.natDegree < p.natDegree
h✝ : ¬p.natDegree = q.natDegree
h : q.natDegree < p.natDegree
⊢ False

tactic: exact LT.lt.false H
state_before: case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
H : p.natDegree < p.natDegree
h✝ : ¬p.natDegree = q.natDegree
h : q.natDegree < p.natDegree
⊢ False
state_after: no goals
Theorem: CategoryTheory.Subgroupoid.subset_generated
File: Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean

tactic: dsimp only [generated, sInf]
state_before: C : Type u
inst✝ : Groupoid C
S : Subgroupoid C
X : (c d : C) → Set (c ⟶ d)
c d : C
⊢ X c d ⊆ (generated X).arrows c d
state_after: C : Type u
inst✝ : Groupoid C
S : Subgroupoid C
X : (c d : C) → Set (c ⟶ d)
c d : C
⊢ X c d ⊆ ⋂ S ∈ {S | ∀ (c d : C), X c d ⊆ S.arrows c d}, S.arrows c d

tactic: simp only [subset_iInter₂_iff]
state_before: C : Type u
inst✝ : Groupoid C
S : Subgroupoid C
X : (c d : C) → Set (c ⟶ d)
c d : C
⊢ X c d ⊆ ⋂ S ∈ {S | ∀ (c d : C), X c d ⊆ S.arrows c d}, S.arrows c d
state_after: C : Type u
inst✝ : Groupoid C
S : Subgroupoid C
X : (c d : C) → Set (c ⟶ d)
c d : C
⊢ ∀ i ∈ {S | ∀ (c d : C), X c d ⊆ S.arrows c d}, X c d ⊆ i.arrows c d

tactic: exact fun S hS f fS => hS _ _ fS
state_before: C : Type u
inst✝ : Groupoid C
S : Subgroupoid C
X : (c d : C) → Set (c ⟶ d)
c d : C
⊢ ∀ i ∈ {S | ∀ (c d : C), X c d ⊆ S.arrows c d}, X c d ⊆ i.arrows c d
state_after: no goals
Theorem: Padic.valuation_one
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: change dite (CauSeq.const (padicNorm p) 1 ≈ _) _ _ = _
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ valuation 1 = 0
state_after: p : ℕ
hp : Fact (Nat.Prime p)
⊢ (if hf : const (padicNorm p) 1 ≈ 0 then 0
    else padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) =
    0

tactic: have h : ¬CauSeq.const (padicNorm p) 1 ≈ 0 := by
  intro H
  erw [const_equiv p] at H
  exact one_ne_zero H
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ (if hf : const (padicNorm p) 1 ≈ 0 then 0
    else padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) =
    0
state_after: p : ℕ
hp : Fact (Nat.Prime p)
h : ¬const (padicNorm p) 1 ≈ 0
⊢ (if hf : const (padicNorm p) 1 ≈ 0 then 0
    else padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) =
    0

tactic: rw [dif_neg h]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
h : ¬const (padicNorm p) 1 ≈ 0
⊢ (if hf : const (padicNorm p) 1 ≈ 0 then 0
    else padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) =
    0
state_after: p : ℕ
hp : Fact (Nat.Prime p)
h : ¬const (padicNorm p) 1 ≈ 0
⊢ padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint h)) = 0

tactic: simp
state_before: p : ℕ
hp : Fact (Nat.Prime p)
h : ¬const (padicNorm p) 1 ≈ 0
⊢ padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint h)) = 0
state_after: no goals

tactic: intro H
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ ¬const (padicNorm p) 1 ≈ 0
state_after: p : ℕ
hp : Fact (Nat.Prime p)
H : const (padicNorm p) 1 ≈ 0
⊢ False

tactic: erw [const_equiv p] at H
state_before: p : ℕ
hp : Fact (Nat.Prime p)
H : const (padicNorm p) 1 ≈ 0
⊢ False
state_after: p : ℕ
hp : Fact (Nat.Prime p)
H : 1 = 0
⊢ False

tactic: exact one_ne_zero H
state_before: p : ℕ
hp : Fact (Nat.Prime p)
H : 1 = 0
⊢ False
state_after: no goals
Theorem: char_zero_of_expChar_one
File: Mathlib/Algebra/CharP/ExpChar.lean

tactic: cases hq
state_before: R : Type u
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p : ℕ
hp : CharP R p
hq : ExpChar R 1
⊢ p = 0
state_after: case zero
R : Type u
inst✝² : Semiring R
inst✝¹ : Nontrivial R
p : ℕ
hp : CharP R p
inst✝ : CharZero R
⊢ p = 0

case prime
R : Type u
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p : ℕ
hp : CharP R p
hprime✝ : Nat.Prime 1
hchar✝ : CharP R 1
⊢ p = 0

tactic: exact CharP.eq R hp inferInstance
state_before: case zero
R : Type u
inst✝² : Semiring R
inst✝¹ : Nontrivial R
p : ℕ
hp : CharP R p
inst✝ : CharZero R
⊢ p = 0
state_after: no goals

tactic: exact False.elim (CharP.char_ne_one R 1 rfl)
state_before: case prime
R : Type u
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p : ℕ
hp : CharP R p
hprime✝ : Nat.Prime 1
hchar✝ : CharP R 1
⊢ p = 0
state_after: no goals
Theorem: Real.tendsto_exp_comp_nhds_zero
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: simp_rw [← comp_apply (f := exp), ← tendsto_comap_iff, comap_exp_nhds_zero]
state_before: α : Type u_1
x y z : ℝ
l : Filter α
f : α → ℝ
⊢ Tendsto (fun x => rexp (f x)) l (𝓝 0) ↔ Tendsto f l atBot
state_after: no goals
Theorem: mulDissociated_empty
File: Mathlib/Combinatorics/Additive/Dissociation.lean

tactic: simp [MulDissociated, subset_empty_iff]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CommGroup α
inst✝ : CommGroup β
s : Set α
t u : Finset α
d : ℕ
a : α
⊢ MulDissociated ∅
state_after: no goals
Theorem: EuclideanGeometry.orthogonalProjection_vsub_orthogonalProjection
File: Mathlib/Geometry/Euclidean/Basic.lean

tactic: apply orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
⊢ (_root_.orthogonalProjection s.direction) (p -ᵥ ↑((orthogonalProjection s) p)) = 0
state_after: case hv
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
⊢ p -ᵥ ↑((orthogonalProjection s) p) ∈ s.directionᗮ

tactic: intro c hc
state_before: case hv
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
⊢ p -ᵥ ↑((orthogonalProjection s) p) ∈ s.directionᗮ
state_after: case hv
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
c : V
hc : c ∈ s.direction
⊢ ⟪c, p -ᵥ ↑((orthogonalProjection s) p)⟫_ℝ = 0

tactic: rw [← neg_vsub_eq_vsub_rev, inner_neg_right,
  orthogonalProjection_vsub_mem_direction_orthogonal s p c hc, neg_zero]
state_before: case hv
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
c : V
hc : c ∈ s.direction
⊢ ⟪c, p -ᵥ ↑((orthogonalProjection s) p)⟫_ℝ = 0
state_after: no goals
Theorem: Set.exists_subset_range_and_iff
File: Mathlib/Data/Set/Image.lean

tactic: rw [← exists_range_iff, range_image]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
f : α → β
p : Set β → Prop
⊢ (∃ s ⊆ range f, p s) ↔ ∃ s, p (f '' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
f : α → β
p : Set β → Prop
⊢ (∃ s ⊆ range f, p s) ↔ ∃ a ∈ 𝒫 range f, p a

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
f : α → β
p : Set β → Prop
⊢ (∃ s ⊆ range f, p s) ↔ ∃ a ∈ 𝒫 range f, p a
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.sub_comp
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

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

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

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

tactic: simp only [aeSeq, hx, if_true]
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i) μ
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ aeSeq hf p i x = AEMeasurable.mk (f i) ⋯ x
state_after: no goals
Theorem: Mathlib.Tactic.Peel.frequently_congr
File: Mathlib/Tactic/Peel.lean

tactic: congr! 2
state_before: α : Type u_1
p q : α → Prop
f : Filter α
hq : ∀ (x : α), p x ↔ q x
⊢ (∃ᶠ (x : α) in f, p x) ↔ ∃ᶠ (x : α) in f, q x
state_after: case a.h.e'_2.h.a
α : Type u_1
p q : α → Prop
f : Filter α
hq : ∀ (x : α), p x ↔ q x
x✝ : α
⊢ p x✝ ↔ q x✝

tactic: exact hq _
state_before: case a.h.e'_2.h.a
α : Type u_1
p q : α → Prop
f : Filter α
hq : ∀ (x : α), p x ↔ q x
x✝ : α
⊢ p x✝ ↔ q x✝
state_after: no goals
Theorem: isRadical_iff_squarefree_or_zero
File: Mathlib/Algebra/Squarefree/Basic.lean

tactic: rintro rfl
state_before: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
x y p d : R
inst✝ : DecompositionMonoid R
⊢ x = 0 → IsRadical x
state_after: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
y p d : R
inst✝ : DecompositionMonoid R
⊢ IsRadical 0

tactic: rw [zero_isRadical_iff]
state_before: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
y p d : R
inst✝ : DecompositionMonoid R
⊢ IsRadical 0
state_after: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
y p d : R
inst✝ : DecompositionMonoid R
⊢ IsReduced R

tactic: infer_instance
state_before: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
y p d : R
inst✝ : DecompositionMonoid R
⊢ IsReduced R
state_after: no goals
Theorem: Ordnode.toList_node
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [toList, foldr, foldr_cons_eq_toList]
state_before: α : Type u_1
s : ℕ
l : Ordnode α
x : α
r : Ordnode α
⊢ (node s l x r).toList = l.toList ++ x :: r.toList
state_after: α : Type u_1
s : ℕ
l : Ordnode α
x : α
r : Ordnode α
⊢ l.toList ++ x :: foldr List.cons r [] = l.toList ++ x :: r.toList

tactic: rfl
state_before: α : Type u_1
s : ℕ
l : Ordnode α
x : α
r : Ordnode α
⊢ l.toList ++ x :: foldr List.cons r [] = l.toList ++ x :: r.toList
state_after: no goals
Theorem: mul_inv_cancel_right
File: Mathlib/Algebra/Group/Defs.lean

tactic: rw [mul_assoc, mul_right_inv, mul_one]
state_before: G : Type u_1
inst✝ : Group G
a✝ b✝ c a b : G
⊢ a * b * b⁻¹ = a
state_after: no goals
Theorem: AddLECancellable.le_tsub_iff_right
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [add_comm]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
ha : AddLECancellable a
h : a ≤ c
⊢ b ≤ c - a ↔ b + a ≤ c
state_after: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
ha : AddLECancellable a
h : a ≤ c
⊢ b ≤ c - a ↔ a + b ≤ c

tactic: exact ha.le_tsub_iff_left h
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
ha : AddLECancellable a
h : a ≤ c
⊢ b ≤ c - a ↔ a + b ≤ c
state_after: no goals
Theorem: Polynomial.finite_setOf_isRoot
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: classical
simpa only [← Finset.setOf_mem, Multiset.mem_toFinset, mem_roots hp]
  using p.roots.toFinset.finite_toSet
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : p ≠ 0
⊢ {x | p.IsRoot x}.Finite
state_after: no goals

tactic: simpa only [← Finset.setOf_mem, Multiset.mem_toFinset, mem_roots hp]
  using p.roots.toFinset.finite_toSet
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : p ≠ 0
⊢ {x | p.IsRoot x}.Finite
state_after: no goals
Theorem: mul_boole
File: Mathlib/Algebra/Ring/Defs.lean

tactic: simp
state_before: α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : MulZeroOneClass α
P : Prop
inst✝ : Decidable P
a : α
⊢ (a * if P then 1 else 0) = if P then a else 0
state_after: no goals
Theorem: StrictMono.maximal_preimage_top
File: Mathlib/Order/BoundedOrder.lean

tactic: rw [h_top]
state_before: α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
inst✝² : LinearOrder α
inst✝¹ : Preorder β
inst✝ : OrderTop β
f : α → β
H : StrictMono f
a : α
h_top : f a = ⊤
x : α
p : β
⊢ p ≤ f a
state_after: α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
inst✝² : LinearOrder α
inst✝¹ : Preorder β
inst✝ : OrderTop β
f : α → β
H : StrictMono f
a : α
h_top : f a = ⊤
x : α
p : β
⊢ p ≤ ⊤

tactic: exact le_top
state_before: α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
inst✝² : LinearOrder α
inst✝¹ : Preorder β
inst✝ : OrderTop β
f : α → β
H : StrictMono f
a : α
h_top : f a = ⊤
x : α
p : β
⊢ p ≤ ⊤
state_after: no goals
Theorem: Polynomial.cyclotomic.dvd_X_pow_sub_one
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: suffices cyclotomic n ℤ ∣ X ^ n - 1 by
  simpa only [map_cyclotomic_int, Polynomial.map_sub, Polynomial.map_one, Polynomial.map_pow,
    Polynomial.map_X] using map_dvd (Int.castRingHom R) this
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic n R ∣ X ^ n - 1
state_after: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic n ℤ ∣ X ^ n - 1

tactic: rcases n.eq_zero_or_pos with (rfl | hn)
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic n ℤ ∣ X ^ n - 1
state_after: case inl
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic 0 ℤ ∣ X ^ 0 - 1

case inr
n : ℕ
R : Type u_1
inst✝ : Ring R
hn : n > 0
⊢ cyclotomic n ℤ ∣ X ^ n - 1

tactic: rw [← prod_cyclotomic_eq_X_pow_sub_one hn]
state_before: case inr
n : ℕ
R : Type u_1
inst✝ : Ring R
hn : n > 0
⊢ cyclotomic n ℤ ∣ X ^ n - 1
state_after: case inr
n : ℕ
R : Type u_1
inst✝ : Ring R
hn : n > 0
⊢ cyclotomic n ℤ ∣ ∏ i ∈ n.divisors, cyclotomic i ℤ

tactic: exact Finset.dvd_prod_of_mem _ (n.mem_divisors_self hn.ne')
state_before: case inr
n : ℕ
R : Type u_1
inst✝ : Ring R
hn : n > 0
⊢ cyclotomic n ℤ ∣ ∏ i ∈ n.divisors, cyclotomic i ℤ
state_after: no goals

tactic: simpa only [map_cyclotomic_int, Polynomial.map_sub, Polynomial.map_one, Polynomial.map_pow,
  Polynomial.map_X] using map_dvd (Int.castRingHom R) this
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
this : cyclotomic n ℤ ∣ X ^ n - 1
⊢ cyclotomic n R ∣ X ^ n - 1
state_after: no goals

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic 0 ℤ ∣ X ^ 0 - 1
state_after: no goals
Theorem: Primrec.listLookup
File: Mathlib/Computability/Primrec.lean

tactic: induction' ps with p ps ih <;> simp [List.lookup, *]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable σ
inst✝ : DecidableEq α
a : α
ps : List (α × β)
⊢ (List.recOn (a, ps).2 none fun b l IH =>
      bif ((a, ps), b, l, IH).1.1 == ((a, ps), b, l, IH).2.1.1 then some ((a, ps), b, l, IH).2.1.2
      else ((a, ps), b, l, IH).2.2.2) =
    List.lookup a ps
state_after: case cons
α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable σ
inst✝ : DecidableEq α
a : α
p : α × β
ps : List (α × β)
ih :
  (List.recOn (a, ps).2 none fun b l IH =>
      bif ((a, ps), b, l, IH).1.1 == ((a, ps), b, l, IH).2.1.1 then some ((a, ps), b, l, IH).2.1.2
      else ((a, ps), b, l, IH).2.2.2) =
    List.lookup a ps
⊢ (bif a == p.1 then some p.2 else List.lookup a ps) =
    match a == p.1 with
    | true => some p.2
    | false => List.lookup a ps

tactic: cases ha : a == p.1 <;> simp [ha]
state_before: case cons
α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable σ
inst✝ : DecidableEq α
a : α
p : α × β
ps : List (α × β)
ih :
  (List.recOn (a, ps).2 none fun b l IH =>
      bif ((a, ps), b, l, IH).1.1 == ((a, ps), b, l, IH).2.1.1 then some ((a, ps), b, l, IH).2.1.2
      else ((a, ps), b, l, IH).2.2.2) =
    List.lookup a ps
⊢ (bif a == p.1 then some p.2 else List.lookup a ps) =
    match a == p.1 with
    | true => some p.2
    | false => List.lookup a ps
state_after: no goals
Theorem: List.countP_pos
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

tactic: simp only [countP_eq_length_filter, length_pos_iff_exists_mem, mem_filter, exists_prop]
state_before: α : Type u_1
p q : α → Bool
l : List α
⊢ 0 < countP p l ↔ ∃ a, a ∈ l ∧ p a = true
state_after: no goals
Theorem: MeasureTheory.martingale_const
File: Mathlib/Probability/Martingale/Basic.lean

tactic: rw [condexp_const (ℱ.le _)]
state_before: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁴ : Preorder ι
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f g : ι → Ω → E
ℱ✝ ℱ : Filtration ι m0
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
x : E
i j : ι
x✝ : i ≤ j
⊢ μ[(fun x_1 x_2 => x) j|↑ℱ i] =ᶠ[ae μ] (fun x_1 x_2 => x) i
state_after: no goals
Theorem: IsLocalization.isPrime_of_isPrime_disjoint
File: Mathlib/RingTheory/Localization/Ideal.lean

tactic: rw [isPrime_iff_isPrime_disjoint M S, comap_map_of_isPrime_disjoint M S I hp hd]
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
hp : I.IsPrime
hd : Disjoint ↑M ↑I
⊢ (Ideal.map (algebraMap R S) I).IsPrime
state_after: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
hp : I.IsPrime
hd : Disjoint ↑M ↑I
⊢ I.IsPrime ∧ Disjoint ↑M ↑I

tactic: exact ⟨hp, hd⟩
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
hp : I.IsPrime
hd : Disjoint ↑M ↑I
⊢ I.IsPrime ∧ Disjoint ↑M ↑I
state_after: no goals
Theorem: Finset.card_inter
File: Mathlib/Data/Finset/Card.lean

tactic: rw [← card_inter_add_card_union, Nat.add_sub_cancel]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s✝ t✝ u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
s t : Finset α
⊢ (s ∩ t).card = s.card + t.card - (s ∪ t).card
state_after: no goals
Theorem: Finset.isLowerSet_shatterer
File: Mathlib/Combinatorics/SetFamily/Shatter.lean

tactic: simpa using Shatters.mono_right
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
n : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
⊢ t ≤ s → s ∈ ↑𝒜.shatterer → t ∈ ↑𝒜.shatterer
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.ext
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

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

tactic: apply h
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
z₁ z₂ : Cochain F G n
h : ∀ (p q : ℤ) (hpq : p + n = q), z₁.v p q hpq = z₂.v p q hpq
p q : ℤ
hpq : p + n = q
⊢ z₁ { p := p, q := q, hpq := hpq } = z₂ { p := p, q := q, hpq := hpq }
state_after: no goals
Theorem: minpoly.two_le_natDegree_subalgebra
File: Mathlib/FieldTheory/Minpoly/Basic.lean

tactic: rw [two_le_natDegree_iff int, Iff.not]
state_before: A : Type u_1
B✝ : Type u_2
B' : Type u_3
inst✝⁶ : CommRing A
inst✝⁵ : Ring B✝
inst✝⁴ : Algebra A B✝
x✝ : B✝
inst✝³ : Nontrivial B✝
B : Type u_4
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : Nontrivial B
S : Subalgebra A B
x : B
int : IsIntegral (↥S) x
⊢ 2 ≤ (minpoly (↥S) x).natDegree ↔ x ∉ S
state_after: A : Type u_1
B✝ : Type u_2
B' : Type u_3
inst✝⁶ : CommRing A
inst✝⁵ : Ring B✝
inst✝⁴ : Algebra A B✝
x✝ : B✝
inst✝³ : Nontrivial B✝
B : Type u_4
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : Nontrivial B
S : Subalgebra A B
x : B
int : IsIntegral (↥S) x
⊢ x ∈ (algebraMap (↥S) B).range ↔ x ∈ S

tactic: apply Set.ext_iff.mp Subtype.range_val_subtype
state_before: A : Type u_1
B✝ : Type u_2
B' : Type u_3
inst✝⁶ : CommRing A
inst✝⁵ : Ring B✝
inst✝⁴ : Algebra A B✝
x✝ : B✝
inst✝³ : Nontrivial B✝
B : Type u_4
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : Nontrivial B
S : Subalgebra A B
x : B
int : IsIntegral (↥S) x
⊢ x ∈ (algebraMap (↥S) B).range ↔ x ∈ S
state_after: no goals
Theorem: ModularGroup.re_T_inv_smul
File: Mathlib/NumberTheory/Modular.lean

tactic: simpa using re_T_zpow_smul z (-1)
state_before: g : SL(2, ℤ)
z : ℍ
⊢ (T⁻¹ • z).re = z.re - 1
state_after: no goals