tasksource/leandojo huggingface dataset:
Theorem: Complex.cos_add_cos
File: Mathlib/Data/Complex/Exponential.lean

tactic: have h2 : (2 : ℂ) ≠ 0 := by norm_num
state_before: x y : ℂ
⊢ cos x + cos y = 2 * cos ((x + y) / 2) * cos ((x - y) / 2)

tactic: calc
  cos x + cos y = cos ((x + y) / 2 + (x - y) / 2) + cos ((x + y) / 2 - (x - y) / 2) := ?_
  _ =
      cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) +
        (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)) :=
    ?_
  _ = 2 * cos ((x + y) / 2) * cos ((x - y) / 2) := ?_
state_before: x y : ℂ
h2 : 2 ≠ 0
⊢ cos x + cos y = 2 * cos ((x + y) / 2) * cos ((x - y) / 2)

tactic: ring
state_before: case calc_3
x y : ℂ
h2 : 2 ≠ 0
⊢ cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) +
      (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)) =
    2 * cos ((x + y) / 2) * cos ((x - y) / 2)

tactic: norm_num
state_before: x y : ℂ
⊢ 2 ≠ 0

tactic: congr <;> field_simp [h2]
state_before: case calc_1
x y : ℂ
h2 : 2 ≠ 0
⊢ cos x + cos y = cos ((x + y) / 2 + (x - y) / 2) + cos ((x + y) / 2 - (x - y) / 2)

tactic: rw [cos_add, cos_sub]
state_before: case calc_2
x y : ℂ
h2 : 2 ≠ 0
⊢ cos ((x + y) / 2 + (x - y) / 2) + cos ((x + y) / 2 - (x - y) / 2) =
    cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) +
      (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2))
Theorem: continuous_stoneCechUnit
File: Mathlib/Topology/StoneCech.lean

tactic: have : (g.map pure).toFilter ≤ 𝓝 g := by
  rw [ultrafilter_converges_iff]
  exact (bind_pure _).symm
state_before: α : Type u
inst✝ : TopologicalSpace α
x : α
g : Ultrafilter α
gx : ↑g ≤ 𝓝 x
⊢ Tendsto stoneCechUnit (↑g) (𝓝 (stoneCechUnit x))

tactic: have : (g.map stoneCechUnit : Filter (StoneCech α)) ≤ 𝓝 ⟦g⟧ :=
  continuousAt_iff_ultrafilter.mp (continuous_quotient_mk'.tendsto g) _ this
state_before: α : Type u
inst✝ : TopologicalSpace α
x : α
g : Ultrafilter α
gx : ↑g ≤ 𝓝 x
this : ↑(Ultrafilter.map pure g) ≤ 𝓝 g
⊢ Tendsto stoneCechUnit (↑g) (𝓝 (stoneCechUnit x))

tactic: rwa [show ⟦g⟧ = ⟦pure x⟧ from Quotient.sound <| convergent_eqv_pure gx] at this
state_before: α : Type u
inst✝ : TopologicalSpace α
x : α
g : Ultrafilter α
gx : ↑g ≤ 𝓝 x
this✝ : ↑(Ultrafilter.map pure g) ≤ 𝓝 g
this : ↑(Ultrafilter.map stoneCechUnit g) ≤ 𝓝 (Quotient.mk (stoneCechSetoid α) g)
⊢ Tendsto stoneCechUnit (↑g) (𝓝 (stoneCechUnit x))

tactic: rw [ultrafilter_converges_iff]
state_before: α : Type u
inst✝ : TopologicalSpace α
x : α
g : Ultrafilter α
gx : ↑g ≤ 𝓝 x
⊢ ↑(Ultrafilter.map pure g) ≤ 𝓝 g

tactic: exact (bind_pure _).symm
state_before: α : Type u
inst✝ : TopologicalSpace α
x : α
g : Ultrafilter α
gx : ↑g ≤ 𝓝 x
⊢ g = joinM (Ultrafilter.map pure g)
Theorem: List.finRange_map_get
File: Mathlib/Data/List/Range.lean

tactic: simp
state_before: α : Type u
l : List α
⊢ length (map (get l) (finRange (length l))) = length l

tactic: simp
state_before: α : Type u
l : List α
⊢ ∀ (n : ℕ) (h₁ : n < length (map (get l) (finRange (length l)))) (h₂ : n < length l),
    get (map (get l) (finRange (length l))) { val := n, isLt := h₁ } = get l { val := n, isLt := h₂ }
Theorem: Nat.xgcd_val
File: Mathlib/Data/Int/GCD.lean

tactic: unfold gcdA gcdB
state_before: x y : ℕ
⊢ xgcd x y = (gcdA x y, gcdB x y)

tactic: cases xgcd x y
state_before: x y : ℕ
⊢ xgcd x y = ((xgcd x y).fst, (xgcd x y).snd)

tactic: rfl
state_before: case mk
x y : ℕ
fst✝ snd✝ : ℤ
⊢ (fst✝, snd✝) = ((fst✝, snd✝).fst, (fst✝, snd✝).snd)
Theorem: exists_nhds_square
File: Mathlib/Topology/Constructions.lean

tactic: simpa [nhds_prod_eq, (nhds_basis_opens x).prod_self.mem_iff, and_assoc, and_left_comm] using hx
state_before: α : Type u
β : Type v
γ : Type ?u.50921
δ : Type ?u.50924
ε : Type ?u.50927
ζ : Type ?u.50930
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set (α × α)
x : α
hx : s ∈ 𝓝 (x, x)
⊢ ∃ U, IsOpen U ∧ x ∈ U ∧ U ×ˢ U ⊆ s
Theorem: Filter.HasBasis.cauchy_iff
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: simp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, ball_mem_comm]
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
ι : Sort u_1
p : ι → Prop
s : ι → Set (α × α)
h : HasBasis (𝓤 α) p s
f : Filter α
⊢ (∀ (i' : ι), p i' → ∃ i, i ∈ f ∧ id i ×ˢ id i ⊆ s i') ↔
    ∀ (i : ι), p i → ∃ t, t ∈ f ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (x, y) ∈ s i
Theorem: Function.Surjective.preimage_subset_preimage_iff
File: Mathlib/Data/Set/Image.lean

tactic: apply Set.preimage_subset_preimage_iff
state_before: ι : Sort ?u.104761
α : Type u_2
β : Type u_1
f : α → β
s t : Set β
hf : Surjective f
⊢ f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t

tactic: rw [Function.Surjective.range_eq hf]
state_before: case hs
ι : Sort ?u.104761
α : Type u_2
β : Type u_1
f : α → β
s t : Set β
hf : Surjective f
⊢ s ⊆ range f

tactic: apply subset_univ
state_before: case hs
ι : Sort ?u.104761
α : Type u_2
β : Type u_1
f : α → β
s t : Set β
hf : Surjective f
⊢ s ⊆ univ
Theorem: balanced_iff_neg_mem
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: refine' ⟨fun h x => h.neg_mem_iff.2, fun h a ha => smul_set_subset_iff.2 fun x hx => _⟩
state_before: 𝕜 : Type ?u.232896
𝕝 : Type ?u.232899
E : Type u_1
ι : Sort ?u.232905
κ : ι → Sort ?u.232910
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : Set E
hs : Convex ℝ s
⊢ Balanced ℝ s ↔ ∀ ⦃x : E⦄, x ∈ s → -x ∈ s

tactic: rw [Real.norm_eq_abs, abs_le] at ha
state_before: 𝕜 : Type ?u.232896
𝕝 : Type ?u.232899
E : Type u_1
ι : Sort ?u.232905
κ : ι → Sort ?u.232910
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : Set E
hs : Convex ℝ s
h : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s
a : ℝ
ha : ‖a‖ ≤ 1
x : E
hx : x ∈ s
⊢ a • x ∈ s

tactic: rw [show a = -((1 - a) / 2) + (a - -1) / 2 by ring, add_smul, neg_smul, ← smul_neg]
state_before: 𝕜 : Type ?u.232896
𝕝 : Type ?u.232899
E : Type u_1
ι : Sort ?u.232905
κ : ι → Sort ?u.232910
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : Set E
hs : Convex ℝ s
h : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s
a : ℝ
ha : -1 ≤ a ∧ a ≤ 1
x : E
hx : x ∈ s
⊢ a • x ∈ s

tactic: exact
  hs (h hx) hx (div_nonneg (sub_nonneg_of_le ha.2) zero_le_two)
    (div_nonneg (sub_nonneg_of_le ha.1) zero_le_two) (by ring)
state_before: 𝕜 : Type ?u.232896
𝕝 : Type ?u.232899
E : Type u_1
ι : Sort ?u.232905
κ : ι → Sort ?u.232910
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : Set E
hs : Convex ℝ s
h : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s
a : ℝ
ha : -1 ≤ a ∧ a ≤ 1
x : E
hx : x ∈ s
⊢ ((1 - a) / 2) • -x + ((a - -1) / 2) • x ∈ s

tactic: ring
state_before: 𝕜 : Type ?u.232896
𝕝 : Type ?u.232899
E : Type u_1
ι : Sort ?u.232905
κ : ι → Sort ?u.232910
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : Set E
hs : Convex ℝ s
h : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s
a : ℝ
ha : -1 ≤ a ∧ a ≤ 1
x : E
hx : x ∈ s
⊢ a = -((1 - a) / 2) + (a - -1) / 2

tactic: ring
state_before: 𝕜 : Type ?u.232896
𝕝 : Type ?u.232899
E : Type u_1
ι : Sort ?u.232905
κ : ι → Sort ?u.232910
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : Set E
hs : Convex ℝ s
h : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s
a : ℝ
ha : -1 ≤ a ∧ a ≤ 1
x : E
hx : x ∈ s
⊢ (1 - a) / 2 + (a - -1) / 2 = 1
Theorem: InnerProductSpace.Core.inner_sub_right
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: simp [sub_eq_add_neg, inner_add_right, inner_neg_right]
state_before: 𝕜 : Type u_1
E : Type ?u.603708
F : Type u_2
inst✝² : IsROrC 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y z : F
⊢ inner x (y - z) = inner x y - inner x z
Theorem: Nat.boddDiv2_eq
File: Mathlib/Data/Nat/Bits.lean

tactic: unfold bodd div2
state_before: n✝ n : ℕ
⊢ boddDiv2 n = (bodd n, div2 n)

tactic: cases boddDiv2 n
state_before: n✝ n : ℕ
⊢ boddDiv2 n = ((boddDiv2 n).fst, (boddDiv2 n).snd)

tactic: rfl
state_before: case mk
n✝ n : ℕ
fst✝ : Bool
snd✝ : ℕ
⊢ (fst✝, snd✝) = ((fst✝, snd✝).fst, (fst✝, snd✝).snd)
Theorem: Submonoid.LocalizationMap.eq_of_eq
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: obtain ⟨c, hc⟩ := f.eq_iff_exists.1 h
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_3
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
x y : M
h : ↑(toMap f) x = ↑(toMap f) y
⊢ ↑g x = ↑g y

tactic: rw [← one_mul (g x), ← IsUnit.liftRight_inv_mul (g.restrict S) hg c]
state_before: case intro
M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_3
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
x y : M
h : ↑(toMap f) x = ↑(toMap f) y
c : { x // x ∈ S }
hc : ↑c * x = ↑c * y
⊢ ↑g x = ↑g y

tactic: show _ * g c * _ = _
state_before: case intro
M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_3
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
x y : M
h : ↑(toMap f) x = ↑(toMap f) y
c : { x // x ∈ S }
hc : ↑c * x = ↑c * y
⊢ ↑(↑(IsUnit.liftRight (MonoidHom.restrict g S) hg) c)⁻¹ * ↑(MonoidHom.restrict g S) c * ↑g x = ↑g y

tactic: rw [mul_assoc, ← g.map_mul, hc, mul_comm, mul_inv_left hg, g.map_mul]
state_before: case intro
M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_3
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
x y : M
h : ↑(toMap f) x = ↑(toMap f) y
c : { x // x ∈ S }
hc : ↑c * x = ↑c * y
⊢ ↑(↑(IsUnit.liftRight (MonoidHom.restrict g S) hg) c)⁻¹ * ↑g ↑c * ↑g x = ↑g y
Theorem: Int.negSucc_eq'
File: Std/Data/Int/Lemmas.lean

tactic: simp only [negSucc_eq, Int.neg_add]
state_before: m : Nat
⊢ -[m+1] = -↑m - 1

tactic: rfl
state_before: m : Nat
⊢ -↑m + -1 = -↑m - 1
Theorem: Module.End.hasGeneralizedEigenvalue_of_hasGeneralizedEigenvalue_of_le
File: Mathlib/LinearAlgebra/Eigenspace/Basic.lean

tactic: unfold HasGeneralizedEigenvalue at *
state_before: K R : Type v
V M : Type w
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
f : End R M
μ : R
k m : ℕ
hm : k ≤ m
hk : HasGeneralizedEigenvalue f μ k
⊢ HasGeneralizedEigenvalue f μ m

tactic: contrapose! hk
state_before: K R : Type v
V M : Type w
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
f : End R M
μ : R
k m : ℕ
hm : k ≤ m
hk : ↑(generalizedEigenspace f μ) k ≠ ⊥
⊢ ↑(generalizedEigenspace f μ) m ≠ ⊥

tactic: rw [← le_bot_iff, ← hk]
state_before: K R : Type v
V M : Type w
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
f : End R M
μ : R
k m : ℕ
hm : k ≤ m
hk : ↑(generalizedEigenspace f μ) m = ⊥
⊢ ↑(generalizedEigenspace f μ) k = ⊥

tactic: exact (f.generalizedEigenspace μ).monotone hm
state_before: K R : Type v
V M : Type w
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
f : End R M
μ : R
k m : ℕ
hm : k ≤ m
hk : ↑(generalizedEigenspace f μ) m = ⊥
⊢ ↑(generalizedEigenspace f μ) k ≤ ↑(generalizedEigenspace f μ) m
Theorem: MeasureTheory.measure_mul_right_null
File: Mathlib/MeasureTheory/Group/Prod.lean

tactic: simp_rw [← inv_preimage, preimage_preimage, mul_inv_rev, inv_inv]
state_before: G : Type u_1
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Group G
inst✝⁴ : MeasurableMul₂ G
μ ν : Measure G
inst✝³ : SigmaFinite ν
inst✝² : SigmaFinite μ
s : Set G
inst✝¹ : MeasurableInv G
inst✝ : IsMulLeftInvariant μ
y : G
⊢ ↑↑μ ((fun x => x * y) ⁻¹' s) = 0 ↔ ↑↑μ ((fun x => y⁻¹ * x) ⁻¹' s⁻¹)⁻¹ = 0

tactic: simp only [measure_inv_null μ, measure_preimage_mul]
state_before: G : Type u_1
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Group G
inst✝⁴ : MeasurableMul₂ G
μ ν : Measure G
inst✝³ : SigmaFinite ν
inst✝² : SigmaFinite μ
s : Set G
inst✝¹ : MeasurableInv G
inst✝ : IsMulLeftInvariant μ
y : G
⊢ ↑↑μ ((fun x => y⁻¹ * x) ⁻¹' s⁻¹)⁻¹ = 0 ↔ ↑↑μ s = 0
Theorem: BoxIntegral.IntegrationParams.hasBasis_toFilter
File: Mathlib/Analysis/BoxIntegral/Partition/Filter.lean

tactic: simpa only [setOf_exists] using hasBasis_iSup (l.hasBasis_toFilterDistortion I)
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J : Box ι
c c₁ c₂ : ℝ≥0
r r₁ r₂ : (ι → ℝ) → ↑(Set.Ioi 0)
π π₁ π₂ : TaggedPrepartition I✝
l✝ l₁ l₂ l : IntegrationParams
I : Box ι
⊢ HasBasis (toFilter l I) (fun r => ∀ (c : ℝ≥0), RCond l (r c)) fun r => {π | ∃ c, MemBaseSet l I c (r c) π}
Theorem: multiplicity.dvd_iff_multiplicity_pos
File: Mathlib/RingTheory/Multiplicity.lean

tactic: simpa only [heq, Nat.cast_zero] using PartENat.coe_lt_coe.mpr zero_lt_one
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
hdvd : a ∣ b
heq : 0 = multiplicity a b
⊢ multiplicity a b < 1

tactic: rwa [pow_one a]
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
hdvd : a ∣ b
heq : 0 = multiplicity a b
⊢ a ^ 1 ∣ b
Theorem: SymplecticGroup.neg_mem
File: Mathlib/LinearAlgebra/SymplecticGroup.lean

tactic: rw [mem_iff] at h⊢
state_before: l : Type u_1
R : Type u_2
inst✝² : DecidableEq l
inst✝¹ : Fintype l
inst✝ : CommRing R
A : Matrix (l ⊕ l) (l ⊕ l) R
h : A ∈ symplecticGroup l R
⊢ -A ∈ symplecticGroup l R

tactic: simp [h]
state_before: l : Type u_1
R : Type u_2
inst✝² : DecidableEq l
inst✝¹ : Fintype l
inst✝ : CommRing R
A : Matrix (l ⊕ l) (l ⊕ l) R
h : A ⬝ J l R ⬝ Aᵀ = J l R
⊢ (-A) ⬝ J l R ⬝ (-A)ᵀ = J l R
Theorem: ModuleCat.mono_iff_ker_eq_bot
File: Mathlib/Algebra/Category/ModuleCat/EpiMono.lean

tactic: convert LinearMap.ker_eq_bot.1 hf
state_before: R : Type u
inst✝² : Ring R
X Y : ModuleCat R
f : X ⟶ Y
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
hf : LinearMap.ker f = ⊥
⊢ Function.Injective ((forget (ModuleCat R)).map f)
Theorem: Set.Subsingleton.closure
File: Mathlib/Topology/Separation.lean

tactic: rcases hs.eq_empty_or_singleton with (rfl | ⟨x, rfl⟩) <;> simp
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T1Space α
s : Set α
hs : Set.Subsingleton s
⊢ Set.Subsingleton (_root_.closure s)
Theorem: AdjoinRoot.nontrivial
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: simp_rw [Ne.def, span_singleton_eq_top, Polynomial.isUnit_iff, not_exists, not_and]
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
h : degree f ≠ 0
⊢ span {f} ≠ ⊤

tactic: rintro x hx rfl
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
h : degree f ≠ 0
⊢ ∀ (x : R), IsUnit x → ¬↑C x = f

tactic: exact h (degree_C hx.ne_zero)
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : R
hx : IsUnit x
h : degree (↑C x) ≠ 0
⊢ False
Theorem: Set.Definable.map_expansion
File: Mathlib/ModelTheory/Definability.lean

tactic: obtain ⟨ψ, rfl⟩ := h
state_before: M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type ?u.417
B : Set M
s : Set (α → M)
L' : Language
inst✝¹ : Structure L' M
h : Definable A L s
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
⊢ Definable A L' s

tactic: refine' ⟨(φ.addConstants A).onFormula ψ, _⟩
state_before: case intro
M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type ?u.417
B : Set M
L' : Language
inst✝¹ : Structure L' M
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
ψ : Formula (L[[↑A]]) α
⊢ Definable A L' (setOf (Formula.Realize ψ))

tactic: ext x
state_before: case intro
M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type ?u.417
B : Set M
L' : Language
inst✝¹ : Structure L' M
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
ψ : Formula (L[[↑A]]) α
⊢ setOf (Formula.Realize ψ) = setOf (Formula.Realize (LHom.onFormula (LHom.addConstants (↑A) φ) ψ))

tactic: simp only [mem_setOf_eq, LHom.realize_onFormula]
state_before: case intro.h
M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type ?u.417
B : Set M
L' : Language
inst✝¹ : Structure L' M
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
ψ : Formula (L[[↑A]]) α
x : α → M
⊢ x ∈ setOf (Formula.Realize ψ) ↔ x ∈ setOf (Formula.Realize (LHom.onFormula (LHom.addConstants (↑A) φ) ψ))
Theorem: WittVector.ghostFun_zsmul
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: ghost_fun_tac m • (X 0 : MvPolynomial _ ℤ), ![x.coeff]
state_before: p : ℕ
R : Type u_1
S : Type ?u.801752
T : Type ?u.801755
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type ?u.801770
β : Type ?u.801773
x y : 𝕎 R
m : ℤ
⊢ WittVector.ghostFun (m • x) = m • WittVector.ghostFun x
Theorem: Polynomial.toFinsupp_neg
File: Mathlib/Data/Polynomial/Basic.lean

tactic: cases a
state_before: R✝ : Type u
a✝ b : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a : R[X]
⊢ (-a).toFinsupp = -a.toFinsupp

tactic: rw [← ofFinsupp_neg]
state_before: case ofFinsupp
R✝ : Type u
a b : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ (-{ toFinsupp := toFinsupp✝ }).toFinsupp = -{ toFinsupp := toFinsupp✝ }.toFinsupp
Theorem: Class.coe_sUnion
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: rfl
state_before: x y : ZFSet
⊢ (∃ z, ↑x z ∧ y ∈ z) ↔ ∃ z, z ∈ x ∧ y ∈ z
Theorem: MeasureTheory.L1.ofReal_norm_eq_lintegral
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [norm_def, ENNReal.ofReal_toReal]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1305559
δ : Type ?u.1305562
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : { x // x ∈ Lp β 1 }
⊢ ENNReal.ofReal ‖f‖ = ∫⁻ (x : α), ↑‖↑↑f x‖₊ ∂μ

tactic: exact ne_of_lt (hasFiniteIntegral_coeFn f)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1305559
δ : Type ?u.1305562
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : { x // x ∈ Lp β 1 }
⊢ (∫⁻ (a : α), ↑‖↑↑f a‖₊ ∂μ) ≠ ⊤
Theorem: TendstoUniformlyOn.tendstoLocallyUniformlyOn
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: simpa using h u hu
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x✝¹ : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
h : TendstoUniformlyOn F f p s
u : Set (β × β)
hu : u ∈ 𝓤 β
x : α
x✝ : x ∈ s
⊢ ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ s → (f y, F n y) ∈ u
Theorem: Matrix.inv_adjugate
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: refine' inv_eq_left_inv _
state_before: l : Type ?u.302074
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A✝ B A : Matrix n n α
h : IsUnit (det A)
⊢ (adjugate A)⁻¹ = (IsUnit.unit h)⁻¹ • A

tactic: rw [smul_mul, mul_adjugate, Units.smul_def, smul_smul, h.val_inv_mul, one_smul]
state_before: l : Type ?u.302074
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A✝ B A : Matrix n n α
h : IsUnit (det A)
⊢ ((IsUnit.unit h)⁻¹ • A) ⬝ adjugate A = 1
Theorem: WithTop.add_lt_top
File: Mathlib/Algebra/Order/Monoid/WithTop.lean

tactic: simp_rw [WithTop.lt_top_iff_ne_top, add_ne_top]
state_before: α : Type u
β : Type v
inst✝¹ : Add α
a✝ b✝ c d : WithTop α
x y : α
inst✝ : LT α
a b : WithTop α
⊢ a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤
Theorem: CategoryTheory.Equivalence.unitInv_app_inverse
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: symm
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
Y : D
⊢ (unitInv e).app (e.inverse.obj Y) = e.inverse.map ((counit e).app Y)

tactic: erw [← Iso.hom_comp_eq_id (e.unitIso.app _), unit_inverse_comp]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
Y : D
⊢ e.inverse.map ((counit e).app Y) = (unitInv e).app (e.inverse.obj Y)

tactic: rfl
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
Y : D
⊢ 𝟙 (e.inverse.obj Y) = 𝟙 ((𝟭 C).obj (e.inverse.obj Y))
Theorem: AbsoluteValue.map_neg
File: Mathlib/Algebra/Order/AbsoluteValue.lean

tactic: by_cases ha : a = 0
state_before: R : Type u_2
S : Type u_1
inst✝² : Ring R
inst✝¹ : OrderedCommRing S
abv : AbsoluteValue R S
inst✝ : NoZeroDivisors S
a : R
⊢ ↑abv (-a) = ↑abv a

tactic: refine'
  (mul_self_eq_mul_self_iff.mp (by rw [← map_mul abv, neg_mul_neg, map_mul abv])).resolve_right _
state_before: case neg
R : Type u_2
S : Type u_1
inst✝² : Ring R
inst✝¹ : OrderedCommRing S
abv : AbsoluteValue R S
inst✝ : NoZeroDivisors S
a : R
ha : ¬a = 0
⊢ ↑abv (-a) = ↑abv a

tactic: exact ((neg_lt_zero.mpr (abv.pos ha)).trans (abv.pos (neg_ne_zero.mpr ha))).ne'
state_before: case neg
R : Type u_2
S : Type u_1
inst✝² : Ring R
inst✝¹ : OrderedCommRing S
abv : AbsoluteValue R S
inst✝ : NoZeroDivisors S
a : R
ha : ¬a = 0
⊢ ¬↑abv (-a) = -↑abv a

tactic: simp [ha]
state_before: case pos
R : Type u_2
S : Type u_1
inst✝² : Ring R
inst✝¹ : OrderedCommRing S
abv : AbsoluteValue R S
inst✝ : NoZeroDivisors S
a : R
ha : a = 0
⊢ ↑abv (-a) = ↑abv a

tactic: rw [← map_mul abv, neg_mul_neg, map_mul abv]
state_before: R : Type u_2
S : Type u_1
inst✝² : Ring R
inst✝¹ : OrderedCommRing S
abv : AbsoluteValue R S
inst✝ : NoZeroDivisors S
a : R
ha : ¬a = 0
⊢ ↑abv (-a) * ↑abv (-a) = ↑abv a * ↑abv a
Theorem: Dfinsupp.lex_lt_of_lt
File: Mathlib/Data/Dfinsupp/Lex.lean

tactic: simp_rw [Pi.Lex, le_antisymm_iff]
state_before: ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt : x < y
⊢ Pi.Lex r (fun {i} x x_1 => x < x_1) ↑x ↑y

tactic: exact lex_lt_of_lt_of_preorder r hlt
state_before: ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt : x < y
⊢ ∃ i, (∀ (j : ι), r j i → ↑x j ≤ ↑y j ∧ ↑y j ≤ ↑x j) ∧ ↑x i < ↑y i
Theorem: Associates.isUnit_mk
File: Mathlib/Algebra/Associated.lean

tactic: rw [isUnit_iff_eq_one, one_eq_mk_one, mk_eq_mk_iff_associated]
state_before: α : Type u_1
β : Type ?u.295731
γ : Type ?u.295734
δ : Type ?u.295737
inst✝ : CommMonoid α
a : α
⊢ IsUnit (Associates.mk a) ↔ a ~ᵤ 1
Theorem: Set.image_const_sub_Iio
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: have := image_comp (fun x => a + x) fun x => -x
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a - x) '' Iio b = Ioi (a - b)

tactic: dsimp [Function.comp] at this
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
this : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)
⊢ (fun x => a - x) '' Iio b = Ioi (a - b)

tactic: simp [sub_eq_add_neg, this, add_comm]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
this : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)
⊢ (fun x => a - x) '' Iio b = Ioi (a - b)
Theorem: List.get_set_ne
File: Std/Data/List/Lemmas.lean

tactic: simp at hj
state_before: α : Type ?u.120711
l : List α
i j : Nat
h : i ≠ j
a : α
hj : j < length (set l i a)
⊢ j < length l

tactic: exact hj
state_before: α : Type ?u.120711
l : List α
i j : Nat
h : i ≠ j
a : α
hj : j < length l
⊢ j < length l

tactic: rw [← Option.some_inj, ← get?_eq_get, get?_set_ne _ _ h, get?_eq_get]
state_before: α : Type u_1
l : List α
i j : Nat
h : i ≠ j
a : α
hj : j < length (set l i a)
⊢ get (set l i a) { val := j, isLt := hj } = get l { val := j, isLt := (_ : j < length l) }
Theorem: Multiset.all_one_of_le_one_le_of_prod_eq_one
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: simp only [quot_mk_to_coe, coe_prod, mem_coe]
state_before: ι : Type ?u.125685
α : Type u_1
β : Type ?u.125691
γ : Type ?u.125694
inst✝ : OrderedCommMonoid α
s t : Multiset α
a : α
⊢ ∀ (a : List α),
    (∀ (x : α), x ∈ Quotient.mk (List.isSetoid α) a → 1 ≤ x) →
      prod (Quotient.mk (List.isSetoid α) a) = 1 → ∀ (x : α), x ∈ Quotient.mk (List.isSetoid α) a → x = 1

tactic: exact fun l => List.all_one_of_le_one_le_of_prod_eq_one
state_before: ι : Type ?u.125685
α : Type u_1
β : Type ?u.125691
γ : Type ?u.125694
inst✝ : OrderedCommMonoid α
s t : Multiset α
a : α
⊢ ∀ (a : List α), (∀ (x : α), x ∈ a → 1 ≤ x) → List.prod a = 1 → ∀ (x : α), x ∈ a → x = 1