1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.tendsto_cons
File: Mathlib/Topology/List.lean

tactic: rw [nhds_cons, Tendsto, Filter.map_prod]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a : α
l : List α
⊢ Tendsto (fun p => p.1 :: p.2) (𝓝 a ×ˢ 𝓝 l) (𝓝 (a :: l))
state_after: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a : α
l : List α
⊢ (Filter.map (fun a b => (a, b).1 :: (a, b).2) (𝓝 a)).seq (𝓝 l) ≤ Seq.seq (cons <$> 𝓝 a) fun x => 𝓝 l

tactic: exact le_rfl
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a : α
l : List α
⊢ (Filter.map (fun a b => (a, b).1 :: (a, b).2) (𝓝 a)).seq (𝓝 l) ≤ Seq.seq (cons <$> 𝓝 a) fun x => 𝓝 l
state_after: no goals
Theorem: div_two_sub_self
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: suffices a / 2 - (a / 2 + a / 2) = -(a / 2) by rwa [add_halves] at this
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a✝ b c d : α
n : ℤ
a : α
⊢ a / 2 - a = -(a / 2)
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a✝ b c d : α
n : ℤ
a : α
⊢ a / 2 - (a / 2 + a / 2) = -(a / 2)

tactic: rw [sub_add_eq_sub_sub, sub_self, zero_sub]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a✝ b c d : α
n : ℤ
a : α
⊢ a / 2 - (a / 2 + a / 2) = -(a / 2)
state_after: no goals

tactic: rwa [add_halves] at this
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a✝ b c d : α
n : ℤ
a : α
this : a / 2 - (a / 2 + a / 2) = -(a / 2)
⊢ a / 2 - a = -(a / 2)
state_after: no goals
Theorem: Matrix.isUnit_fromBlocks_iff_of_invertible₂₂
File: Mathlib/LinearAlgebra/Matrix/SchurComplement.lean

tactic: simp only [← nonempty_invertible_iff_isUnit,
  (invertibleEquivFromBlocks₂₂Invertible A B C D).nonempty_congr]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
α : Type u_4
inst✝⁷ : Fintype l
inst✝⁶ : Fintype m
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : CommRing α
A : Matrix m m α
B : Matrix m n α
C : Matrix n m α
D : Matrix n n α
inst✝ : Invertible D
⊢ IsUnit (fromBlocks A B C D) ↔ IsUnit (A - B * ⅟D * C)
state_after: no goals
Theorem: MeasureTheory.lintegral_mul_const'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: simp_rw [mul_comm, lintegral_const_mul' r f hr]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
⊢ ∫⁻ (a : α), f a * r ∂μ = (∫⁻ (a : α), f a ∂μ) * r
state_after: no goals
Theorem: EMetric.exists_ball_subset_ball
File: Mathlib/Topology/EMetricSpace/Basic.lean

tactic: have : 0 < ε - edist y x := by simpa using h
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
⊢ ∃ ε' > 0, ball y ε' ⊆ ball x ε
state_after: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
this : 0 < ε - edist y x
⊢ ∃ ε' > 0, ball y ε' ⊆ ball x ε

tactic: refine ⟨ε - edist y x, this, ball_subset ?_ (ne_top_of_lt h)⟩
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
this : 0 < ε - edist y x
⊢ ∃ ε' > 0, ball y ε' ⊆ ball x ε
state_after: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
this : 0 < ε - edist y x
⊢ edist y x + (ε - edist y x) ≤ ε

tactic: exact (add_tsub_cancel_of_le (mem_ball.mp h).le).le
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
this : 0 < ε - edist y x
⊢ edist y x + (ε - edist y x) ≤ ε
state_after: no goals

tactic: simpa using h
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
⊢ 0 < ε - edist y x
state_after: no goals
Theorem: Surreal.Multiplication.numeric_of_ih
File: Mathlib/SetTheory/Surreal/Multiplication.lean

tactic: constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)
state_before: x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih : ∀ (a : Args), ArgsRel a (Args.P1 x y) → P124 a
hx : x.Numeric
hy : y.Numeric
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
⊢ (x₁ * y).Numeric ∧ (x₂ * y).Numeric
state_after: case left
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih : ∀ (a : Args), ArgsRel a (Args.P1 x y) → P124 a
hx : x.Numeric
hy : y.Numeric
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
⊢ CutExpand IsOption (Args.P1 x₁ y).toMultiset (Args.P24 x₁ x₂ y).toMultiset

case right
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih : ∀ (a : Args), ArgsRel a (Args.P1 x y) → P124 a
hx : x.Numeric
hy : y.Numeric
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
⊢ CutExpand IsOption (Args.P1 x₂ y).toMultiset (Args.P24 x₁ x₂ y).toMultiset

tactic: exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero
state_before: case left
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih : ∀ (a : Args), ArgsRel a (Args.P1 x y) → P124 a
hx : x.Numeric
hy : y.Numeric
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
⊢ CutExpand IsOption (Args.P1 x₁ y).toMultiset (Args.P24 x₁ x₂ y).toMultiset
state_after: no goals

tactic: exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero
state_before: case right
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih : ∀ (a : Args), ArgsRel a (Args.P1 x y) → P124 a
hx : x.Numeric
hy : y.Numeric
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
⊢ CutExpand IsOption (Args.P1 x₂ y).toMultiset (Args.P24 x₁ x₂ y).toMultiset
state_after: no goals
Theorem: sub_pow_char_pow_of_commute
File: Mathlib/Algebra/CharP/Basic.lean

tactic: induction n with
| zero => simp
| succ n n_ih =>
    rw [pow_succ, pow_mul, pow_mul, pow_mul, n_ih]
    apply sub_pow_char_of_commute; apply Commute.pow_pow h
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
n : ℕ
x y : R
h : Commute x y
⊢ (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n
state_after: no goals

tactic: simp
state_before: case zero
R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x y : R
h : Commute x y
⊢ (x - y) ^ p ^ 0 = x ^ p ^ 0 - y ^ p ^ 0
state_after: no goals

tactic: rw [pow_succ, pow_mul, pow_mul, pow_mul, n_ih]
state_before: case succ
R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x y : R
h : Commute x y
n : ℕ
n_ih : (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n
⊢ (x - y) ^ p ^ (n + 1) = x ^ p ^ (n + 1) - y ^ p ^ (n + 1)
state_after: case succ
R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x y : R
h : Commute x y
n : ℕ
n_ih : (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n
⊢ (x ^ p ^ n - y ^ p ^ n) ^ p = (x ^ p ^ n) ^ p - (y ^ p ^ n) ^ p

tactic: apply sub_pow_char_of_commute
state_before: case succ
R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x y : R
h : Commute x y
n : ℕ
n_ih : (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n
⊢ (x ^ p ^ n - y ^ p ^ n) ^ p = (x ^ p ^ n) ^ p - (y ^ p ^ n) ^ p
state_after: case succ.h
R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x y : R
h : Commute x y
n : ℕ
n_ih : (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n
⊢ Commute (x ^ p ^ n) (y ^ p ^ n)

tactic: apply Commute.pow_pow h
state_before: case succ.h
R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x y : R
h : Commute x y
n : ℕ
n_ih : (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n
⊢ Commute (x ^ p ^ n) (y ^ p ^ n)
state_after: no goals
Theorem: Real.logb_rpow_eq_mul_logb_of_pos
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [logb, log_rpow hx, logb, mul_div_assoc]
state_before: b x y : ℝ
hx : 0 < x
⊢ logb b (x ^ y) = y * logb b x
state_after: no goals
Theorem: HasStrictFDerivAt.implicitFunction_apply_image
File: Mathlib/Analysis/Calculus/Implicit.lean

tactic: haveI := FiniteDimensional.complete 𝕜 F
state_before: 𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : CompleteSpace 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : CompleteSpace E
F : Type u_3
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
inst✝ : FiniteDimensional 𝕜 F
f : E → F
f' : E →L[𝕜] F
a : E
hf : HasStrictFDerivAt f f' a
hf' : range f' = ⊤
⊢ implicitFunction f f' hf hf' (f a) 0 = a
state_after: 𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : CompleteSpace 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : CompleteSpace E
F : Type u_3
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
inst✝ : FiniteDimensional 𝕜 F
f : E → F
f' : E →L[𝕜] F
a : E
hf : HasStrictFDerivAt f f' a
hf' : range f' = ⊤
this : CompleteSpace F
⊢ implicitFunction f f' hf hf' (f a) 0 = a

tactic: apply implicitFunctionOfComplemented_apply_image
state_before: 𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : CompleteSpace 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : CompleteSpace E
F : Type u_3
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
inst✝ : FiniteDimensional 𝕜 F
f : E → F
f' : E →L[𝕜] F
a : E
hf : HasStrictFDerivAt f f' a
hf' : range f' = ⊤
this : CompleteSpace F
⊢ implicitFunction f f' hf hf' (f a) 0 = a
state_after: no goals
Theorem: Finset.prod_pair
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: rw [prod_insert (not_mem_singleton.2 h), prod_singleton]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a✝ : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
a b : α
h : a ≠ b
⊢ ∏ x ∈ {a, b}, f x = f a * f b
state_after: no goals
Theorem: Polynomial.induction_on'
File: Mathlib/Algebra/Polynomial/Induction.lean

tactic: rw [C_mul_X_pow_eq_monomial]
state_before: R : Type u
S : Type v
T : Type w
ι : Type x
k : Type y
A : Type z
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
M : R[X] → Prop
p : R[X]
h_add : ∀ (p q : R[X]), M p → M q → M (p + q)
h_monomial : ∀ (n : ℕ) (a : R), M ((monomial n) a)
n : ℕ
a : R
_h : M (C a * X ^ n)
⊢ M (C a * X ^ (n + 1))
state_after: R : Type u
S : Type v
T : Type w
ι : Type x
k : Type y
A : Type z
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
M : R[X] → Prop
p : R[X]
h_add : ∀ (p q : R[X]), M p → M q → M (p + q)
h_monomial : ∀ (n : ℕ) (a : R), M ((monomial n) a)
n : ℕ
a : R
_h : M (C a * X ^ n)
⊢ M ((monomial (n + 1)) a)

tactic: exact h_monomial _ _
state_before: R : Type u
S : Type v
T : Type w
ι : Type x
k : Type y
A : Type z
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
M : R[X] → Prop
p : R[X]
h_add : ∀ (p q : R[X]), M p → M q → M (p + q)
h_monomial : ∀ (n : ℕ) (a : R), M ((monomial n) a)
n : ℕ
a : R
_h : M (C a * X ^ n)
⊢ M ((monomial (n + 1)) a)
state_after: no goals
Theorem: Finset.exists_minimal
File: Mathlib/Data/Fintype/Card.lean

tactic: obtain ⟨c, hcs : c ∈ s⟩ := h
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
h : s.Nonempty
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m
state_after: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
c : α
hcs : c ∈ s
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m

tactic: have : WellFounded (@LT.lt { x // x ∈ s } _) := Finite.wellFounded_of_trans_of_irrefl _
state_before: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
c : α
hcs : c ∈ s
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m
state_after: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
c : α
hcs : c ∈ s
this : WellFounded LT.lt
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m

tactic: obtain ⟨⟨m, hms : m ∈ s⟩, -, H⟩ := this.has_min Set.univ ⟨⟨c, hcs⟩, trivial⟩
state_before: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
c : α
hcs : c ∈ s
this : WellFounded LT.lt
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m
state_after: case intro.intro.mk.intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
c : α
hcs : c ∈ s
this : WellFounded LT.lt
m : α
hms : m ∈ s
H : ∀ x ∈ Set.univ, ¬x < ⟨m, hms⟩
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m

tactic: exact ⟨m, hms, fun x hx hxm => H ⟨x, hx⟩ trivial hxm⟩
state_before: case intro.intro.mk.intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Preorder α
s : Finset α
c : α
hcs : c ∈ s
this : WellFounded LT.lt
m : α
hms : m ∈ s
H : ∀ x ∈ Set.univ, ¬x < ⟨m, hms⟩
⊢ ∃ m ∈ s, ∀ x ∈ s, ¬x < m
state_after: no goals
Theorem: le_compl_iff_disjoint_right
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [← himp_bot, le_himp_iff, disjoint_iff_inf_le]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : HeytingAlgebra α
a b c : α
⊢ a ≤ bᶜ ↔ Disjoint a b
state_after: no goals
Theorem: Submodule.IsPrincipal.generator_submoduleImage_dvd_of_mem
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: rw [← mem_iff_generator_dvd, LinearMap.mem_submoduleImage_of_le hNO]
state_before: R : Type u
M : Type v
inst✝³ : AddCommGroup M
inst✝² : CommRing R
inst✝¹ : Module R M
N O : Submodule R M
hNO : N ≤ O
ϕ : ↥O →ₗ[R] R
inst✝ : (ϕ.submoduleImage N).IsPrincipal
x : M
hx : x ∈ N
⊢ generator (ϕ.submoduleImage N) ∣ ϕ ⟨x, ⋯⟩
state_after: R : Type u
M : Type v
inst✝³ : AddCommGroup M
inst✝² : CommRing R
inst✝¹ : Module R M
N O : Submodule R M
hNO : N ≤ O
ϕ : ↥O →ₗ[R] R
inst✝ : (ϕ.submoduleImage N).IsPrincipal
x : M
hx : x ∈ N
⊢ ∃ y, ∃ (yN : y ∈ N), ϕ ⟨y, ⋯⟩ = ϕ ⟨x, ⋯⟩

tactic: exact ⟨x, hx, rfl⟩
state_before: R : Type u
M : Type v
inst✝³ : AddCommGroup M
inst✝² : CommRing R
inst✝¹ : Module R M
N O : Submodule R M
hNO : N ≤ O
ϕ : ↥O →ₗ[R] R
inst✝ : (ϕ.submoduleImage N).IsPrincipal
x : M
hx : x ∈ N
⊢ ∃ y, ∃ (yN : y ∈ N), ϕ ⟨y, ⋯⟩ = ϕ ⟨x, ⋯⟩
state_after: no goals
Theorem: Group.mem_conjugatesOfSet_iff
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: erw [Set.mem_iUnion₂]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
s : Set G
x : G
⊢ x ∈ conjugatesOfSet s ↔ ∃ a ∈ s, IsConj a x
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
s : Set G
x : G
⊢ (∃ i, ∃ (_ : i ∈ s), x ∈ conjugatesOf i) ↔ ∃ a ∈ s, IsConj a x

tactic: simp only [conjugatesOf, isConj_iff, Set.mem_setOf_eq, exists_prop]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
s : Set G
x : G
⊢ (∃ i, ∃ (_ : i ∈ s), x ∈ conjugatesOf i) ↔ ∃ a ∈ s, IsConj a x
state_after: no goals
Theorem: Turing.PartrecToTM2.K'.elim_update_rev
File: Mathlib/Computability/TMToPartrec.lean

tactic: funext x
state_before: a b c d b' : List Γ'
⊢ update (elim a b c d) rev b' = elim a b' c d
state_after: case h
a b c d b' : List Γ'
x : K'
⊢ update (elim a b c d) rev b' x = elim a b' c d x

tactic: cases x <;> rfl
state_before: case h
a b c d b' : List Γ'
x : K'
⊢ update (elim a b c d) rev b' x = elim a b' c d x
state_after: no goals
Theorem: Nat.card_image_of_injOn
File: Mathlib/SetTheory/Cardinal/Finite.lean

tactic: obtain hs | hs := s.finite_or_infinite
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: case inl
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Finite
⊢ Nat.card ↑(f '' s) = Nat.card ↑s

case inr
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Infinite
⊢ Nat.card ↑(f '' s) = Nat.card ↑s

tactic: have := hs.fintype
state_before: case inl
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Finite
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: case inl
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Finite
this : Fintype ↑s
⊢ Nat.card ↑(f '' s) = Nat.card ↑s

tactic: have := fintypeImage s f
state_before: case inl
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Finite
this : Fintype ↑s
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: case inl
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Finite
this✝ : Fintype ↑s
this : Fintype ↑(f '' s)
⊢ Nat.card ↑(f '' s) = Nat.card ↑s

tactic: simp_rw [Nat.card_eq_fintype_card, Set.card_image_of_inj_on hf]
state_before: case inl
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Finite
this✝ : Fintype ↑s
this : Fintype ↑(f '' s)
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: no goals

tactic: have := hs.to_subtype
state_before: case inr
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Infinite
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: case inr
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Infinite
this : Infinite ↑s
⊢ Nat.card ↑(f '' s) = Nat.card ↑s

tactic: have := (hs.image hf).to_subtype
state_before: case inr
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Infinite
this : Infinite ↑s
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: case inr
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Infinite
this✝ : Infinite ↑s
this : Infinite ↑(f '' s)
⊢ Nat.card ↑(f '' s) = Nat.card ↑s

tactic: simp [Nat.card_eq_zero_of_infinite]
state_before: case inr
α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hf : InjOn f s
hs : s.Infinite
this✝ : Infinite ↑s
this : Infinite ↑(f '' s)
⊢ Nat.card ↑(f '' s) = Nat.card ↑s
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_eq_self
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: rw [← restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
h : s ⊆ t
⊢ μ (toMeasurable (μ.restrict t) s ∩ t) = (μ.restrict t) s
state_after: no goals
Theorem: Ultrafilter.ofComapInfPrincipal_eq_of_map
File: Mathlib/Order/Filter/Ultrafilter.lean

tactic: let f := Filter.comap m g ⊓ 𝓟 s
state_before: α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
⊢ map m (ofComapInfPrincipal h) = g
state_after: α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
⊢ map m (ofComapInfPrincipal h) = g

tactic: haveI : f.NeBot := comap_inf_principal_neBot_of_image_mem h
state_before: α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
⊢ map m (ofComapInfPrincipal h) = g
state_after: α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : f.NeBot
⊢ map m (ofComapInfPrincipal h) = g

tactic: apply eq_of_le
state_before: α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : f.NeBot
⊢ map m (ofComapInfPrincipal h) = g
state_after: case h
α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : f.NeBot
⊢ ↑(map m (ofComapInfPrincipal h)) ≤ ↑g

tactic: calc
  Filter.map m (of f) ≤ Filter.map m f := map_mono (of_le _)
  _ ≤ (Filter.map m <| Filter.comap m g) ⊓ Filter.map m (𝓟 s) := map_inf_le
  _ = (Filter.map m <| Filter.comap m g) ⊓ (𝓟 <| m '' s) := by rw [map_principal]
  _ ≤ ↑g ⊓ (𝓟 <| m '' s) := inf_le_inf_right _ map_comap_le
  _ = ↑g := inf_of_le_left (le_principal_iff.mpr h)
state_before: case h
α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : f.NeBot
⊢ ↑(map m (ofComapInfPrincipal h)) ≤ ↑g
state_after: no goals

tactic: rw [map_principal]
state_before: α : Type u
β : Type v
γ : Type u_1
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : f.NeBot
⊢ Filter.map m (Filter.comap m ↑g) ⊓ Filter.map m (𝓟 s) = Filter.map m (Filter.comap m ↑g) ⊓ 𝓟 (m '' s)
state_after: no goals
Theorem: QuadraticForm.polarBilin_tmul
File: Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean

tactic: simp_rw [← two_nsmul_associated A, ← two_nsmul_associated R, BilinForm.tmul, tmul_smul,
  ← smul_tmul', map_nsmul, associated_tmul]
state_before: R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹² : CommRing R
inst✝¹¹ : CommRing A
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Algebra R A
inst✝⁷ : Module R M₁
inst✝⁶ : Module A M₁
inst✝⁵ : SMulCommClass R A M₁
inst✝⁴ : SMulCommClass A R M₁
inst✝³ : IsScalarTower R A M₁
inst✝² : Module R M₂
inst✝¹ : Invertible 2
inst✝ : Invertible 2
Q₁ : QuadraticForm A M₁
Q₂ : QuadraticForm R M₂
⊢ (Q₁.tmul Q₂).polarBilin = ⅟2 • Q₁.polarBilin.tmul Q₂.polarBilin
state_after: R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹² : CommRing R
inst✝¹¹ : CommRing A
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Algebra R A
inst✝⁷ : Module R M₁
inst✝⁶ : Module A M₁
inst✝⁵ : SMulCommClass R A M₁
inst✝⁴ : SMulCommClass A R M₁
inst✝³ : IsScalarTower R A M₁
inst✝² : Module R M₂
inst✝¹ : Invertible 2
inst✝ : Invertible 2
Q₁ : QuadraticForm A M₁
Q₂ : QuadraticForm R M₂
⊢ 2 • (associated Q₁).tmul (associated Q₂) =
    ⅟2 • 2 • 2 • (BilinForm.tensorDistrib R A) ((associatedHom A) Q₁ ⊗ₜ[R] (associatedHom R) Q₂)

tactic: rw [smul_comm (_ : A) (_ : ℕ), ← smul_assoc, two_smul _ (_ : A), invOf_two_add_invOf_two,
  one_smul]
state_before: R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹² : CommRing R
inst✝¹¹ : CommRing A
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Algebra R A
inst✝⁷ : Module R M₁
inst✝⁶ : Module A M₁
inst✝⁵ : SMulCommClass R A M₁
inst✝⁴ : SMulCommClass A R M₁
inst✝³ : IsScalarTower R A M₁
inst✝² : Module R M₂
inst✝¹ : Invertible 2
inst✝ : Invertible 2
Q₁ : QuadraticForm A M₁
Q₂ : QuadraticForm R M₂
⊢ 2 • (associated Q₁).tmul (associated Q₂) =
    ⅟2 • 2 • 2 • (BilinForm.tensorDistrib R A) ((associatedHom A) Q₁ ⊗ₜ[R] (associatedHom R) Q₂)
state_after: no goals
Theorem: Nat.smmoothNumbers_eq_factoredNumbers_primesBelow
File: Mathlib/NumberTheory/SmoothNumbers.lean

tactic: rw [smoothNumbers_eq_factoredNumbers]
state_before: n : ℕ
⊢ n.smoothNumbers = factoredNumbers n.primesBelow
state_after: n : ℕ
⊢ factoredNumbers (Finset.range n) = factoredNumbers n.primesBelow

tactic: refine Set.Subset.antisymm (fun m hm ↦ ?_) <| factoredNumbers_mono Finset.mem_of_mem_filter
state_before: n : ℕ
⊢ factoredNumbers (Finset.range n) = factoredNumbers n.primesBelow
state_after: n m : ℕ
hm : m ∈ factoredNumbers (Finset.range n)
⊢ m ∈ factoredNumbers n.primesBelow

tactic: simp_rw [mem_factoredNumbers'] at hm ⊢
state_before: n m : ℕ
hm : m ∈ factoredNumbers (Finset.range n)
⊢ m ∈ factoredNumbers n.primesBelow
state_after: n m : ℕ
hm : ∀ (p : ℕ), Prime p → p ∣ m → p ∈ Finset.range n
⊢ ∀ (p : ℕ), Prime p → p ∣ m → p ∈ n.primesBelow

tactic: exact fun p hp hp' ↦ mem_primesBelow.mpr ⟨Finset.mem_range.mp <| hm p hp hp', hp⟩
state_before: n m : ℕ
hm : ∀ (p : ℕ), Prime p → p ∣ m → p ∈ Finset.range n
⊢ ∀ (p : ℕ), Prime p → p ∣ m → p ∈ n.primesBelow
state_after: no goals