1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: RCLike.inv_pos_of_pos
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [pos_iff_exists_ofReal] at hz
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
hz : 0 < z
⊢ 0 < z⁻¹
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
hz : ∃ x > 0, ↑x = z
⊢ 0 < z⁻¹

tactic: obtain ⟨x, hx, hx'⟩ := hz
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
hz : ∃ x > 0, ↑x = z
⊢ 0 < z⁻¹
state_after: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < z⁻¹

tactic: rw [← hx', ← ofReal_inv, ofReal_pos]
state_before: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < z⁻¹
state_after: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < x⁻¹

tactic: exact inv_pos_of_pos hx
state_before: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < x⁻¹
state_after: no goals
Theorem: Eq.subset
File: Mathlib/Data/Set/Basic.lean

tactic: rw [← h₁]
state_before: α : Type u_1
s t : Set α
h₁ : s = t
x✝ : α
h₂ : x✝ ∈ s
⊢ x✝ ∈ t
state_after: α : Type u_1
s t : Set α
h₁ : s = t
x✝ : α
h₂ : x✝ ∈ s
⊢ x✝ ∈ s

tactic: exact h₂
state_before: α : Type u_1
s t : Set α
h₁ : s = t
x✝ : α
h₂ : x✝ ∈ s
⊢ x✝ ∈ s
state_after: no goals
Theorem: Equiv.mul_swap_mul_self
File: Mathlib/GroupTheory/Perm/Basic.lean

tactic: rw [mul_assoc, swap_mul_self, mul_one]
state_before: α : Type u
β : Type v
inst✝ : DecidableEq α
i j : α
σ : Perm α
⊢ σ * swap i j * swap i j = σ
state_after: no goals
Theorem: Set.infsep_zero_iff_subsingleton_of_finite
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: rw [infsep_zero, einfsep_eq_top_iff, or_iff_right_iff_imp]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Set α
inst✝ : Finite ↑s
⊢ s.infsep = 0 ↔ s.Subsingleton
state_after: α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Set α
inst✝ : Finite ↑s
⊢ s.einfsep = 0 → s.Subsingleton

tactic: exact fun H => (einfsep_pos_of_finite.ne' H).elim
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Set α
inst✝ : Finite ↑s
⊢ s.einfsep = 0 → s.Subsingleton
state_after: no goals
Theorem: CategoryTheory.NatTrans.hcomp_id_app
File: Mathlib/CategoryTheory/Functor/Category.lean

tactic: simp
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G H✝ I : C ⥤ D
H : D ⥤ E
α : F ⟶ G
X : C
⊢ (α ◫ 𝟙 H).app X = H.map (α.app X)
state_after: no goals
Theorem: ArithmeticFunction.vonMangoldt_ne_zero_iff
File: Mathlib/NumberTheory/VonMangoldt.lean

tactic: rcases eq_or_ne n 1 with (rfl | hn)
state_before: n : ℕ
⊢ Λ n ≠ 0 ↔ IsPrimePow n
state_after: case inl

⊢ Λ 1 ≠ 0 ↔ IsPrimePow 1

case inr
n : ℕ
hn : n ≠ 1
⊢ Λ n ≠ 0 ↔ IsPrimePow n

tactic: exact (Real.log_pos (one_lt_cast.2 (minFac_prime hn).one_lt)).ne'.ite_ne_right_iff
state_before: case inr
n : ℕ
hn : n ≠ 1
⊢ Λ n ≠ 0 ↔ IsPrimePow n
state_after: no goals

tactic: simp [not_isPrimePow_one]
state_before: case inl

⊢ Λ 1 ≠ 0 ↔ IsPrimePow 1
state_after: no goals
Theorem: List.sublists_map
File: Mathlib/Data/List/Sublists.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
⊢ (map f []).sublists = map (map f) [].sublists
state_after: no goals

tactic: rw [map_cons, sublists_cons, bind_eq_bind, sublists_map f l, sublists_cons,
  bind_eq_bind, map_eq_bind, map_eq_bind]
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
a : α
l : List α
⊢ (map f (a :: l)).sublists = map (map f) (a :: l).sublists
state_after: α : Type u
β : Type v
γ : Type w
f : α → β
a : α
l : List α
⊢ ((l.sublists.bind fun x => [map f x]).bind fun x => [x, f a :: x]) =
    (l.sublists.bind fun x => [x, a :: x]).bind fun x => [map f x]

tactic: induction sublists l <;> simp [*]
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
a : α
l : List α
⊢ ((l.sublists.bind fun x => [map f x]).bind fun x => [x, f a :: x]) =
    (l.sublists.bind fun x => [x, a :: x]).bind fun x => [map f x]
state_after: no goals
Theorem: Finset.esymm_map_val
File: Mathlib/RingTheory/MvPolynomial/Symmetric.lean

tactic: simp only [esymm, powersetCard_map, ← Finset.map_val_val_powersetCard, map_map]
state_before: R : Type u_1
inst✝ : CommSemiring R
σ : Type u_2
f : σ → R
s : Finset σ
n : ℕ
⊢ (map f s.val).esymm n = ∑ t ∈ Finset.powersetCard n s, t.prod f
state_after: R : Type u_1
inst✝ : CommSemiring R
σ : Type u_2
f : σ → R
s : Finset σ
n : ℕ
⊢ (map ((fun x => x.prod) ∘ (fun x => map f x) ∘ Finset.val) (Finset.powersetCard n s).val).sum =
    ∑ t ∈ Finset.powersetCard n s, t.prod f

tactic: rfl
state_before: R : Type u_1
inst✝ : CommSemiring R
σ : Type u_2
f : σ → R
s : Finset σ
n : ℕ
⊢ (map ((fun x => x.prod) ∘ (fun x => map f x) ∘ Finset.val) (Finset.powersetCard n s).val).sum =
    ∑ t ∈ Finset.powersetCard n s, t.prod f
state_after: no goals
Theorem: Nat.range_succ
File: Mathlib/Data/Nat/Set.lean

tactic: ext (_ | i) <;> simp [succ_pos, succ_ne_zero, Set.mem_setOf]
state_before: ⊢ range succ = {i | 0 < i}
state_after: no goals
Theorem: EReal.top_add_of_ne_bot
File: Mathlib/Data/Real/EReal.lean

tactic: induction x
state_before: x : EReal
h : x ≠ ⊥
⊢ ⊤ + x = ⊤
state_after: case h_bot
h : ⊥ ≠ ⊥
⊢ ⊤ + ⊥ = ⊤

case h_real
a✝ : ℝ
h : ↑a✝ ≠ ⊥
⊢ ⊤ + ↑a✝ = ⊤

case h_top
h : ⊤ ≠ ⊥
⊢ ⊤ + ⊤ = ⊤

tactic: exfalso
state_before: case h_bot
h : ⊥ ≠ ⊥
⊢ ⊤ + ⊥ = ⊤
state_after: case h_bot
h : ⊥ ≠ ⊥
⊢ False

tactic: exact h (Eq.refl ⊥)
state_before: case h_bot
h : ⊥ ≠ ⊥
⊢ False
state_after: no goals

tactic: exact top_add_coe _
state_before: case h_real
a✝ : ℝ
h : ↑a✝ ≠ ⊥
⊢ ⊤ + ↑a✝ = ⊤
state_after: no goals

tactic: exact top_add_top
state_before: case h_top
h : ⊤ ≠ ⊥
⊢ ⊤ + ⊤ = ⊤
state_after: no goals
Theorem: MeasureTheory.Measure.measure_le_sInf
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [sInf_apply hs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
m : Set (Measure α)
h : ∀ μ' ∈ m, μ ≤ μ'
this : μ.toOuterMeasure ≤ sInf (toOuterMeasure '' m)
s : Set α
hs : MeasurableSet s
⊢ μ s ≤ (sInf m) s
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
m : Set (Measure α)
h : ∀ μ' ∈ m, μ ≤ μ'
this : μ.toOuterMeasure ≤ sInf (toOuterMeasure '' m)
s : Set α
hs : MeasurableSet s
⊢ μ s ≤ (sInf (toOuterMeasure '' m)) s

tactic: exact this s
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
m : Set (Measure α)
h : ∀ μ' ∈ m, μ ≤ μ'
this : μ.toOuterMeasure ≤ sInf (toOuterMeasure '' m)
s : Set α
hs : MeasurableSet s
⊢ μ s ≤ (sInf (toOuterMeasure '' m)) s
state_after: no goals
Theorem: ENNReal.truncateToReal_eq_toReal
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: have x_lt_top : x < ∞ := lt_of_le_of_lt x_le t_ne_top.lt_top
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
t x : ℝ≥0∞
t_ne_top : t ≠ ⊤
x_le : x ≤ t
⊢ t.truncateToReal x = x.toReal
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
t x : ℝ≥0∞
t_ne_top : t ≠ ⊤
x_le : x ≤ t
x_lt_top : x < ⊤
⊢ t.truncateToReal x = x.toReal

tactic: have obs : min t x ≠ ∞ := by
  simp_all only [ne_eq, ge_iff_le, min_eq_top, false_and, not_false_eq_true]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
t x : ℝ≥0∞
t_ne_top : t ≠ ⊤
x_le : x ≤ t
x_lt_top : x < ⊤
⊢ t.truncateToReal x = x.toReal
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
t x : ℝ≥0∞
t_ne_top : t ≠ ⊤
x_le : x ≤ t
x_lt_top : x < ⊤
obs : min t x ≠ ⊤
⊢ t.truncateToReal x = x.toReal

tactic: exact (ENNReal.toReal_eq_toReal obs x_lt_top.ne).mpr (min_eq_right x_le)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
t x : ℝ≥0∞
t_ne_top : t ≠ ⊤
x_le : x ≤ t
x_lt_top : x < ⊤
obs : min t x ≠ ⊤
⊢ t.truncateToReal x = x.toReal
state_after: no goals

tactic: simp_all only [ne_eq, ge_iff_le, min_eq_top, false_and, not_false_eq_true]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
t x : ℝ≥0∞
t_ne_top : t ≠ ⊤
x_le : x ≤ t
x_lt_top : x < ⊤
⊢ min t x ≠ ⊤
state_after: no goals
Theorem: Finset.image₂_image_right
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f' : α → β → γ
g✝ g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
f : α → γ → δ
g : β → γ
⊢ ↑(image₂ f s (image g t)) = ↑(image₂ (fun a b => f a (g b)) s t)
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f' : α → β → γ
g✝ g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
f : α → γ → δ
g : β → γ
⊢ image2 f (↑s) (g '' ↑t) = image2 (fun a b => f a (g b)) ↑s ↑t

tactic: exact image2_image_right _ _
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f' : α → β → γ
g✝ g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
f : α → γ → δ
g : β → γ
⊢ image2 f (↑s) (g '' ↑t) = image2 (fun a b => f a (g b)) ↑s ↑t
state_after: no goals
Theorem: Odd.map
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rintro ⟨a, rfl⟩
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝³ : Semiring α
inst✝² : Semiring β
a b : α
m n : ℕ
inst✝¹ : FunLike F α β
inst✝ : RingHomClass F α β
f : F
⊢ Odd a → Odd (f a)
state_after: case intro
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝³ : Semiring α
inst✝² : Semiring β
b : α
m n : ℕ
inst✝¹ : FunLike F α β
inst✝ : RingHomClass F α β
f : F
a : α
⊢ Odd (f (2 * a + 1))

tactic: exact ⟨f a, by simp [two_mul]⟩
state_before: case intro
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝³ : Semiring α
inst✝² : Semiring β
b : α
m n : ℕ
inst✝¹ : FunLike F α β
inst✝ : RingHomClass F α β
f : F
a : α
⊢ Odd (f (2 * a + 1))
state_after: no goals

tactic: simp [two_mul]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝³ : Semiring α
inst✝² : Semiring β
b : α
m n : ℕ
inst✝¹ : FunLike F α β
inst✝ : RingHomClass F α β
f : F
a : α
⊢ f (2 * a + 1) = 2 * f a + 1
state_after: no goals
Theorem: Rel.preimage_id
File: Mathlib/Data/Rel.lean

tactic: simp only [preimage, inv_id, image_id]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
⊢ preimage Eq s = s
state_after: no goals
Theorem: LinearMap.lTensor_comp_rTensor
File: Mathlib/LinearAlgebra/TensorProduct/Basic.lean

tactic: simp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]
state_before: R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g✝ : P →ₗ[R] Q
f✝ : N →ₗ[R] P
f : M →ₗ[R] P
g : N →ₗ[R] Q
⊢ lTensor P g ∘ₗ rTensor N f = map f g
state_after: no goals
Theorem: MeasureTheory.exists_nonempty_inter_of_measure_univ_lt_sum_measure
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: contrapose! H
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : μ univ < ∑ i ∈ s, μ (t i)
⊢ ∃ i ∈ s, ∃ j ∈ s, ∃ (_ : i ≠ j), (t i ∩ t j).Nonempty
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → t i ∩ t j = ∅
⊢ ∑ i ∈ s, μ (t i) ≤ μ univ

tactic: apply sum_measure_le_measure_univ h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → t i ∩ t j = ∅
⊢ ∑ i ∈ s, μ (t i) ≤ μ univ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → t i ∩ t j = ∅
⊢ (↑s).PairwiseDisjoint t

tactic: intro i hi j hj hij
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → t i ∩ t j = ∅
⊢ (↑s).PairwiseDisjoint t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → t i ∩ t j = ∅
i : ι
hi : i ∈ ↑s
j : ι
hj : j ∈ ↑s
hij : i ≠ j
⊢ (Disjoint on t) i j

tactic: exact disjoint_iff_inter_eq_empty.mpr (H i hi j hj hij)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, MeasurableSet (t i)
H : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → t i ∩ t j = ∅
i : ι
hi : i ∈ ↑s
j : ι
hj : j ∈ ↑s
hij : i ≠ j
⊢ (Disjoint on t) i j
state_after: no goals
Theorem: IsPrimitiveRoot.prime_norm_toInteger_sub_one_of_prime_ne_two
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

tactic: have := hζ.norm_toInteger_sub_one_of_prime_ne_two hodd
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))

tactic: rw [this]
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ↑↑p

tactic: exact Nat.prime_iff_prime_int.1 hp.out
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ↑↑p
state_after: no goals
Theorem: Real.lt_sq_of_sqrt_lt
File: Mathlib/Data/Real/Sqrt.lean

tactic: have hy := x.sqrt_nonneg.trans_lt h
state_before: x✝ y✝ x y : ℝ
h : √x < y
⊢ x < y ^ 2
state_after: x✝ y✝ x y : ℝ
h : √x < y
hy : 0 < y
⊢ x < y ^ 2

tactic: rwa [← sqrt_lt_sqrt_iff_of_pos (sq_pos_of_pos hy), sqrt_sq hy.le]
state_before: x✝ y✝ x y : ℝ
h : √x < y
hy : 0 < y
⊢ x < y ^ 2
state_after: no goals
Theorem: Multiset.le_smul_dedup
File: Mathlib/Data/Multiset/Fold.lean

tactic: rw [count_nsmul]
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
⊢ count a s ≤ count a (fold max 0 (map (fun a => count a s) s) • s.dedup)
state_after: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * count a s.dedup

tactic: by_cases h : a ∈ s
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * count a s.dedup
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * count a s.dedup

case neg
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∉ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * count a s.dedup

tactic: refine le_trans ?_ (Nat.mul_le_mul_left _ <| count_pos.2 <| mem_dedup.2 h)
state_before: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * count a s.dedup
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * succ 0

tactic: have : count a s ≤ fold max 0 (map (fun a => count a s) (a ::ₘ erase s a)) := by
  simp [le_max_left]
state_before: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * succ 0
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
this : count a s ≤ fold max 0 (map (fun a => count a s) (a ::ₘ s.erase a))
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * succ 0

tactic: rw [cons_erase h] at this
state_before: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
this : count a s ≤ fold max 0 (map (fun a => count a s) (a ::ₘ s.erase a))
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * succ 0
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
this : count a s ≤ fold max 0 (map (fun a => count a s) s)
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * succ 0

tactic: simpa [mul_succ] using this
state_before: case pos
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
this : count a s ≤ fold max 0 (map (fun a => count a s) s)
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * succ 0
state_after: no goals

tactic: simp [le_max_left]
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∈ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) (a ::ₘ s.erase a))
state_after: no goals

tactic: simp [count_eq_zero.2 h, Nat.zero_le]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
a : α
h : a ∉ s
⊢ count a s ≤ fold max 0 (map (fun a => count a s) s) * count a s.dedup
state_after: no goals
Theorem: CategoryTheory.Subgroupoid.obj_surjective_of_im_eq_top
File: Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean

tactic: rintro d
state_before: C : Type u
inst✝¹ : Groupoid C
S : Subgroupoid C
D : Type u_1
inst✝ : Groupoid D
φ : C ⥤ D
hφ : Function.Injective φ.obj
hφ' : im φ hφ = ⊤
⊢ Function.Surjective φ.obj
state_after: C : Type u
inst✝¹ : Groupoid C
S : Subgroupoid C
D : Type u_1
inst✝ : Groupoid D
φ : C ⥤ D
hφ : Function.Injective φ.obj
hφ' : im φ hφ = ⊤
d : D
⊢ ∃ a, φ.obj a = d

tactic: rw [← mem_im_objs_iff, hφ']
state_before: C : Type u
inst✝¹ : Groupoid C
S : Subgroupoid C
D : Type u_1
inst✝ : Groupoid D
φ : C ⥤ D
hφ : Function.Injective φ.obj
hφ' : im φ hφ = ⊤
d : D
⊢ ∃ a, φ.obj a = d
state_after: C : Type u
inst✝¹ : Groupoid C
S : Subgroupoid C
D : Type u_1
inst✝ : Groupoid D
φ : C ⥤ D
hφ : Function.Injective φ.obj
hφ' : im φ hφ = ⊤
d : D
⊢ d ∈ ⊤.objs

tactic: apply mem_top_objs
state_before: C : Type u
inst✝¹ : Groupoid C
S : Subgroupoid C
D : Type u_1
inst✝ : Groupoid D
φ : C ⥤ D
hφ : Function.Injective φ.obj
hφ' : im φ hφ = ⊤
d : D
⊢ d ∈ ⊤.objs
state_after: no goals
Theorem: Filter.image_coe_mem_of_mem_comap
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [h]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : Filter α
U : Set α
h : U ∈ f
W : Set ↑U
W_in : W ∈ comap Subtype.val f
⊢ range Subtype.val ∈ f
state_after: no goals
Theorem: bddBelow_empty
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp only [BddBelow, lowerBounds_empty, univ_nonempty]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s t : Set α
a b : α
inst✝ : Nonempty α
⊢ BddBelow ∅
state_after: no goals
Theorem: AlgebraicGeometry.Scheme.Pullback.cocycle_snd_fst_snd
File: Mathlib/AlgebraicGeometry/Pullbacks.lean

tactic: simp only [pullback.condition_assoc, t'_snd_fst_snd]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : X.OpenCover
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (𝒰.map i ≫ f) g
i j k : 𝒰.J
⊢ t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.snd ≫ pullback.fst ≫ pullback.snd =
    pullback.snd ≫ pullback.fst ≫ pullback.snd
state_after: no goals
Theorem: List.tails_reverse
File: Mathlib/Data/List/Infix.lean

tactic: rw [inits_eq_tails l]
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ l.reverse.tails = (map reverse l.inits).reverse
state_after: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ l.reverse.tails = (map reverse (map reverse l.reverse.tails).reverse).reverse

tactic: simp [reverse_involutive.comp_self, ← map_reverse]
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ l.reverse.tails = (map reverse (map reverse l.reverse.tails).reverse).reverse
state_after: no goals
Theorem: CategoryTheory.Limits.biprod.symmetry'
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

tactic: aesop_cat
state_before: J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
P✝ Q✝ : C
inst✝ : HasBinaryBiproducts C
P Q : C
⊢ lift snd fst ≫ lift snd fst = 𝟙 (P ⊞ Q)
state_after: no goals