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

tactic: simpa only [image_symm, preimage_image]
using hs.image _ h.symm.continuous.continuousOn
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
s : Set X
h : X ≃ₜ Y
hs : IsPreconnected (⇑h '' s)
⊢ IsPreconnected s
state_after: no goals
Theorem: Polynomial.trailingDegree_X_pow
File: Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean

tactic: rw [X_pow_eq_monomial, trailingDegree_monomial one_ne_zero]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p q : R[X]
n : ℕ
⊢ (X ^ n).trailingDegree = ↑n
state_after: no goals
Theorem: smul_pos'
File: Mathlib/Algebra/Order/Module/Defs.lean

tactic: simpa only [zero_smul] using smul_lt_smul_of_pos_right ha hb
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁵ : Zero α
inst✝⁴ : Zero β
inst✝³ : SMulWithZero α β
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : SMulPosStrictMono α β
ha : 0 < a
hb : 0 < b
⊢ 0 < a • b
state_after: no goals
Theorem: integrable_cexp_quadratic'
File: Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean

tactic: have hb' : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]
state_before: b : ℂ
hb : b.re < 0
c d : ℂ
⊢ Integrable (fun x => cexp (b * ↑x ^ 2 + c * ↑x + d)) volume
state_after: b : ℂ
hb : b.re < 0
c d : ℂ
hb' : b ≠ 0
⊢ Integrable (fun x => cexp (b * ↑x ^ 2 + c * ↑x + d)) volume

tactic: by_contra H
state_before: b : ℂ
hb : b.re < 0
c d : ℂ
hb' : b ≠ 0
⊢ Integrable (fun x => cexp (b * ↑x ^ 2 + c * ↑x + d)) volume
state_after: b : ℂ
hb : b.re < 0
c d : ℂ
hb' : b ≠ 0
H : ¬Integrable (fun x => cexp (b * ↑x ^ 2 + c * ↑x + d)) volume
⊢ False

tactic: simpa [hb', pi_ne_zero, Complex.exp_ne_zero, integral_undef H]
  using integral_cexp_quadratic hb c d
state_before: b : ℂ
hb : b.re < 0
c d : ℂ
hb' : b ≠ 0
H : ¬Integrable (fun x => cexp (b * ↑x ^ 2 + c * ↑x + d)) volume
⊢ False
state_after: no goals

tactic: contrapose! hb
state_before: b : ℂ
hb : b.re < 0
c d : ℂ
⊢ b ≠ 0
state_after: b c d : ℂ
hb : b = 0
⊢ 0 ≤ b.re

tactic: rw [hb, zero_re]
state_before: b c d : ℂ
hb : b = 0
⊢ 0 ≤ b.re
state_after: no goals
Theorem: EMetric.preimage_mul_right_closedBall
File: Mathlib/Topology/MetricSpace/IsometricSMul.lean

tactic: rw [div_eq_mul_inv]
state_before: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoEMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoEMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ≥0∞
⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b / a) r
state_after: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoEMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoEMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ≥0∞
⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b * a⁻¹) r

tactic: exact preimage_smul_closedBall (MulOpposite.op a) b r
state_before: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoEMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoEMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ≥0∞
⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b * a⁻¹) r
state_after: no goals
Theorem: LinearMap.isUnit_iff_range_eq_top
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [isUnit_iff_ker_eq_bot, ker_eq_bot_iff_range_eq_top]
state_before: K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
f : V →ₗ[K] V
⊢ IsUnit f ↔ range f = ⊤
state_after: no goals
Theorem: Submodule.mem_span_mul_finite_of_mem_mul
File: Mathlib/Algebra/Algebra/Operations.lean

tactic: rwa [← Submodule.span_eq P, ← Submodule.span_eq Q, Submodule.span_mul_span] at hx
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P✝ Q✝ : Submodule R A
m n : A
P Q : Submodule R A
x : A
hx : x ∈ P * Q
⊢ x ∈ span R (↑P * ↑Q)
state_after: no goals
Theorem: Real.summable_exp_nat_mul_iff
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: simp only [exp_nat_mul, summable_geometric_iff_norm_lt_one, norm_of_nonneg (exp_nonneg _),
  exp_lt_one_iff]
state_before: α : Type u_1
x y z : ℝ
l : Filter α
a : ℝ
⊢ (Summable fun n => rexp (↑n * a)) ↔ a < 0
state_after: no goals
Theorem: SimpleGraph.Reachable.dist_eq_zero_iff
File: Mathlib/Combinatorics/SimpleGraph/Metric.lean

tactic: simp [hr]
state_before: V : Type u_1
G : SimpleGraph V
u v : V
hr : G.Reachable u v
⊢ G.dist u v = 0 ↔ u = v
state_after: no goals
Theorem: CategoryTheory.Limits.opProductIsoCoproduct'_inv_comp_lift
File: Mathlib/CategoryTheory/Limits/Opposites.lean

tactic: refine (Iso.inv_comp_eq _).mpr (Quiver.Hom.unop_inj (hf.hom_ext (fun ⟨j⟩ ↦ Quiver.Hom.op_inj ?_)))
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
⊢ (opProductIsoCoproduct' hf hc).inv ≫ (hf.lift f').op = hc.desc f'.op
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
x✝ : Discrete α
j : α
⊢ ((hf.lift f').op.unop ≫ f.π.app { as := j }).op =
    (((opProductIsoCoproduct' hf hc).hom ≫ hc.desc f'.op).unop ≫ f.π.app { as := j }).op

tactic: simp only [Discrete.functor_obj, unop_op, Quiver.Hom.unop_op, IsLimit.fac, Fan.op, unop_comp,
  Category.assoc, op_comp, op_unop, Quiver.Hom.op_unop]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
x✝ : Discrete α
j : α
⊢ ((hf.lift f').op.unop ≫ f.π.app { as := j }).op =
    (((opProductIsoCoproduct' hf hc).hom ≫ hc.desc f'.op).unop ≫ f.π.app { as := j }).op
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
x✝ : Discrete α
j : α
⊢ (f'.π.app { as := j }).op =
    (f.π.app { as := j }).op ≫
      (opProductIsoCoproduct' hf hc).hom ≫ hc.desc (Cofan.mk { unop := f'.pt } fun a => (f'.proj a).op)

tactic: erw [← Category.assoc, proj_comp_opProductIsoCoproduct'_hom, IsColimit.fac]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
x✝ : Discrete α
j : α
⊢ (f'.π.app { as := j }).op =
    (f.π.app { as := j }).op ≫
      (opProductIsoCoproduct' hf hc).hom ≫ hc.desc (Cofan.mk { unop := f'.pt } fun a => (f'.proj a).op)
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
x✝ : Discrete α
j : α
⊢ (f'.π.app { as := j }).op = (Cofan.mk { unop := f'.pt } fun a => (f'.proj a).op).ι.app { as := j }

tactic: rfl
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u₂
inst✝¹ : Category.{v₂, u₂} J
X : Type v₂
α : Type u_1
Z : α → C
inst✝ : HasProduct Z
f : Fan Z
c : Cofan fun x => { unop := Z x }
hf : IsLimit f
hc : IsColimit c
f' : Fan Z
x✝ : Discrete α
j : α
⊢ (f'.π.app { as := j }).op = (Cofan.mk { unop := f'.pt } fun a => (f'.proj a).op).ι.app { as := j }
state_after: no goals
Theorem: LiouvilleWith.add_nat_iff
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [← Rat.cast_natCast n, add_rat_iff]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x + ↑n) ↔ LiouvilleWith p x
state_after: no goals
Theorem: Surreal.Multiplication.P1_of_lt
File: Mathlib/SetTheory/Surreal/Multiplication.lean

tactic: rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]
state_before: x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : P3 x₃ x₂ y₂ y₃
h₂ : P3 x₁ x₃ y₂ y₁
⊢ P1 x₁ x₂ x₃ y₁ y₂ y₃
state_after: x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : P3 x₃ x₂ y₂ y₃
h₂ : P3 x₁ x₃ y₂ y₁
⊢ ⟦x₃ * y₂⟧ + (⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ + ⟦x₃ * y₃⟧) < ⟦x₃ * y₂⟧ + (⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ + ⟦x₁ * y₂⟧)

tactic: convert add_lt_add h₁ h₂ using 1 <;> abel
state_before: x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : P3 x₃ x₂ y₂ y₃
h₂ : P3 x₁ x₃ y₂ y₁
⊢ ⟦x₃ * y₂⟧ + (⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ + ⟦x₃ * y₃⟧) < ⟦x₃ * y₂⟧ + (⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ + ⟦x₁ * y₂⟧)
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.isCaratheodory_union
File: Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean

tactic: rw [h₁ t, h₂ (t ∩ s₁), h₂ (t \ s₁), h₁ (t ∩ (s₁ ∪ s₂)), inter_diff_assoc _ _ s₁,
  Set.inter_assoc _ _ s₁, inter_eq_self_of_subset_right Set.subset_union_left,
  union_diff_left, h₂ (t ∩ s₁)]
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : m.IsCaratheodory s₁
h₂ : m.IsCaratheodory s₂
t : Set α
⊢ m t = m (t ∩ (s₁ ∪ s₂)) + m (t \ (s₁ ∪ s₂))
state_after: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : m.IsCaratheodory s₁
h₂ : m.IsCaratheodory s₂
t : Set α
⊢ m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + (m (t \ s₁ ∩ s₂) + m ((t \ s₁) \ s₂)) =
    m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + m (t ∩ (s₂ \ s₁)) + m (t \ (s₁ ∪ s₂))

tactic: simp [diff_eq, add_assoc]
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : m.IsCaratheodory s₁
h₂ : m.IsCaratheodory s₂
t : Set α
⊢ m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + (m (t \ s₁ ∩ s₂) + m ((t \ s₁) \ s₂)) =
    m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + m (t ∩ (s₂ \ s₁)) + m (t \ (s₁ ∪ s₂))
state_after: no goals
Theorem: sameRay_neg_swap
File: Mathlib/LinearAlgebra/Ray.lean

tactic: rw [← sameRay_neg_iff, neg_neg]
state_before: R : Type u_1
inst✝⁴ : StrictOrderedCommRing R
M : Type u_2
N : Type u_3
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
x y : M
⊢ SameRay R (-x) y ↔ SameRay R x (-y)
state_after: no goals
Theorem: collinear_insert_insert_insert_left_of_mem_affineSpan_pair
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: refine (collinear_insert_insert_insert_of_mem_affineSpan_pair h₁ h₂ h₃).subset ?_
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ Collinear k {p₁, p₂, p₃, p₄}
state_after: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ {p₁, p₂, p₃, p₄} ⊆ {p₁, p₂, p₃, p₄, p₅}

tactic: repeat apply Set.insert_subset_insert
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ {p₁, p₂, p₃, p₄} ⊆ {p₁, p₂, p₃, p₄, p₅}
state_after: case h.h.h
k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ {p₄} ⊆ {p₄, p₅}

tactic: simp
state_before: case h.h.h
k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ {p₄} ⊆ {p₄, p₅}
state_after: no goals

tactic: apply Set.insert_subset_insert
state_before: case h.h
k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ {p₃, p₄} ⊆ {p₃, p₄, p₅}
state_after: case h.h.h
k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ p₄ p₅ : P
h₁ : p₁ ∈ affineSpan k {p₄, p₅}
h₂ : p₂ ∈ affineSpan k {p₄, p₅}
h₃ : p₃ ∈ affineSpan k {p₄, p₅}
⊢ {p₄} ⊆ {p₄, p₅}
Theorem: FirstOrder.Language.Theory.exists_modelType_is_realized_in
File: Mathlib/ModelTheory/Types.lean

tactic: obtain ⟨M⟩ := p.isMaximal.1
state_before: L : Language
T : L.Theory
α : Type w
M : Type w'
inst✝² : L.Structure M
inst✝¹ : Nonempty M
inst✝ : M ⊨ T
p : T.CompleteType α
⊢ ∃ M, p ∈ T.realizedTypes (↑M) α
state_after: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
⊢ ∃ M, p ∈ T.realizedTypes (↑M) α

tactic: refine ⟨(M.subtheoryModel p.subset).reduct (L.lhomWithConstants α), fun a => (L.con a : M), ?_⟩
state_before: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
⊢ ∃ M, p ∈ T.realizedTypes (↑M) α
state_after: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
⊢ (T.typeOf fun a => ↑(L.con a)) = p

tactic: refine SetLike.ext fun φ => ?_
state_before: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
⊢ (T.typeOf fun a => ↑(L.con a)) = p
state_after: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
φ : L[[α]].Sentence
⊢ (φ ∈ T.typeOf fun a => ↑(L.con a)) ↔ φ ∈ p

tactic: simp only [CompleteType.mem_typeOf]
state_before: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
φ : L[[α]].Sentence
⊢ (φ ∈ T.typeOf fun a => ↑(L.con a)) ↔ φ ∈ p
state_after: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
φ : L[[α]].Sentence
⊢ ((Formula.equivSentence.symm φ).Realize fun a => ↑(L.con a)) ↔ φ ∈ p

tactic: refine
  (@Formula.realize_equivSentence_symm_con _
    ((M.subtheoryModel p.subset).reduct (L.lhomWithConstants α)) _ _ M.struc _ φ).trans
    (_root_.trans (_root_.trans ?_ (p.isMaximal.isComplete.realize_sentence_iff φ M))
      (p.isMaximal.mem_iff_models φ).symm)
state_before: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
φ : L[[α]].Sentence
⊢ ((Formula.equivSentence.symm φ).Realize fun a => ↑(L.con a)) ↔ φ ∈ p
state_after: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
φ : L[[α]].Sentence
⊢ ↑(ModelType.reduct (L.lhomWithConstants α) (M.subtheoryModel ⋯)) ⊨ φ ↔ ↑M ⊨ φ

tactic: rfl
state_before: case intro
L : Language
T : L.Theory
α : Type w
M✝ : Type w'
inst✝² : L.Structure M✝
inst✝¹ : Nonempty M✝
inst✝ : M✝ ⊨ T
p : T.CompleteType α
M : ModelType ↑p
φ : L[[α]].Sentence
⊢ ↑(ModelType.reduct (L.lhomWithConstants α) (M.subtheoryModel ⋯)) ⊨ φ ↔ ↑M ⊨ φ
state_after: no goals
Theorem: Ergodic.ae_empty_or_univ_of_image_ae_le'
File: Mathlib/Dynamics/Ergodic/Ergodic.lean

tactic: replace hs' : s ≤ᵐ[μ] f ⁻¹' s :=
  (HasSubset.Subset.eventuallyLE (subset_preimage_image f s)).trans
    (hf.quasiMeasurePreserving.preimage_mono_ae hs')
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : f '' s ≤ᶠ[ae μ] s
h_fin : μ s ≠ ⊤
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
state_after: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
h_fin : μ s ≠ ⊤
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ

tactic: exact ae_empty_or_univ_of_ae_le_preimage' hf hs hs' h_fin
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
h_fin : μ s ≠ ⊤
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
state_after: no goals
Theorem: Polynomial.X_sub_C_mul_divByMonic_eq_sub_modByMonic
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

tactic: rw [eq_sub_iff_add_eq, ← eq_sub_iff_add_eq', modByMonic_eq_sub_mul_div]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a✝ b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
K : Type u_1
inst✝ : Field K
f : K[X]
a : K
⊢ (X - C a) * (f /ₘ (X - C a)) = f - f %ₘ (X - C a)
state_after: case _hq
R : Type u
S : Type v
k : Type y
A : Type z
a✝ b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
K : Type u_1
inst✝ : Field K
f : K[X]
a : K
⊢ (X - C a).Monic

tactic: exact monic_X_sub_C a
state_before: case _hq
R : Type u
S : Type v
k : Type y
A : Type z
a✝ b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
K : Type u_1
inst✝ : Field K
f : K[X]
a : K
⊢ (X - C a).Monic
state_after: no goals
Theorem: Prod.fst_natCast
File: Mathlib/Data/Nat/Cast/Prod.lean

tactic: induction n <;> simp [*]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : AddMonoidWithOne α
inst✝ : AddMonoidWithOne β
n : ℕ
⊢ (↑n).1 = ↑n
state_after: no goals
Theorem: Int.norm_cast_rat
File: Mathlib/Analysis/Normed/Group/Rat.lean

tactic: rw [← Rat.norm_cast_real, ← Int.norm_cast_real]
state_before: m : ℤ
⊢ ‖↑m‖ = ‖m‖
state_after: m : ℤ
⊢ ‖↑↑m‖ = ‖↑m‖

tactic: congr 1
state_before: m : ℤ
⊢ ‖↑↑m‖ = ‖↑m‖
state_after: no goals
Theorem: LowerSet.mem_iInf_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: rw [← SetLike.mem_coe, coe_iInf]
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_iInter
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.factoredNumbers_compl
File: Mathlib/NumberTheory/SmoothNumbers.lean

tactic: intro n hn
state_before: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
⊢ (factoredNumbers s)ᶜ \ {0} ⊆ {n | N ≤ n}
state_after: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : n ∈ (factoredNumbers s)ᶜ \ {0}
⊢ n ∈ {n | N ≤ n}

tactic: simp only [Set.mem_compl_iff, mem_factoredNumbers, Set.mem_diff, ne_eq, not_and, not_forall,
  not_lt, exists_prop, Set.mem_singleton_iff] at hn
state_before: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : n ∈ (factoredNumbers s)ᶜ \ {0}
⊢ n ∈ {n | N ≤ n}
state_after: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
⊢ n ∈ {n | N ≤ n}

tactic: simp only [Set.mem_setOf_eq]
state_before: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
⊢ n ∈ {n | N ≤ n}
state_after: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
⊢ N ≤ n

tactic: obtain ⟨p, hp₁, hp₂⟩ := hn.1 hn.2
state_before: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
⊢ N ≤ n
state_after: case intro.intro
N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p ∉ s
⊢ N ≤ n

tactic: have : N ≤ p := by
  contrapose! hp₂
  exact h <| mem_primesBelow.mpr ⟨hp₂, prime_of_mem_factors hp₁⟩
state_before: case intro.intro
N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p ∉ s
⊢ N ≤ n
state_after: case intro.intro
N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p ∉ s
this : N ≤ p
⊢ N ≤ n

tactic: exact this.trans <| le_of_mem_factors hp₁
state_before: case intro.intro
N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p ∉ s
this : N ≤ p
⊢ N ≤ n
state_after: no goals

tactic: contrapose! hp₂
state_before: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p ∉ s
⊢ N ≤ p
state_after: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p < N
⊢ p ∈ s

tactic: exact h <| mem_primesBelow.mpr ⟨hp₂, prime_of_mem_factors hp₁⟩
state_before: N : ℕ
s : Finset ℕ
h : N.primesBelow ≤ s
n : ℕ
hn : (¬n = 0 → ∃ x ∈ n.factors, x ∉ s) ∧ ¬n = 0
p : ℕ
hp₁ : p ∈ n.factors
hp₂ : p < N
⊢ p ∈ s
state_after: no goals
Theorem: LinearMap.det_zero
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: simp only [← zero_smul 𝕜 (1 : M →ₗ[𝕜] M), det_smul, mul_one, MonoidHom.map_one]
state_before: R : Type u_1
inst✝¹² : CommRing R
M✝ : Type u_2
inst✝¹¹ : AddCommGroup M✝
inst✝¹⁰ : Module R M✝
M' : Type u_3
inst✝⁹ : AddCommGroup M'
inst✝⁸ : Module R M'
ι : Type u_4
inst✝⁷ : DecidableEq ι
inst✝⁶ : Fintype ι
e : Basis ι R M✝
A : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : Module A M✝
κ : Type u_6
inst✝³ : Fintype κ
𝕜 : Type u_7
inst✝² : Field 𝕜
M : Type u_8
inst✝¹ : AddCommGroup M
inst✝ : Module 𝕜 M
⊢ LinearMap.det 0 = 0 ^ FiniteDimensional.finrank 𝕜 M
state_after: no goals
Theorem: FirstOrder.Language.Formula.realize_equivSentence
File: Mathlib/ModelTheory/Semantics.lean

tactic: rw [← realize_equivSentence_symm_con M (equivSentence φ), _root_.Equiv.symm_apply_apply]
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝⁴ : L.Structure M
inst✝³ : L.Structure N
inst✝² : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
inst✝¹ : L[[α]].Structure M
inst✝ : (L.lhomWithConstants α).IsExpansionOn M
φ : L.Formula α
⊢ M ⊨ equivSentence φ ↔ φ.Realize fun a => ↑(L.con a)
state_after: no goals