tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.CommSq.HasLift.iff
File: Mathlib/CategoryTheory/CommSq.lean

tactic: constructor
state_before: C : Type u_1
inst✝ : Category C
A B X Y : C
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ HasLift sq ↔ Nonempty (LiftStruct sq)

tactic: exacts [fun h => h.exists_lift, fun h => mk h]
state_before: case mp
C : Type u_1
inst✝ : Category C
A B X Y : C
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ HasLift sq → Nonempty (LiftStruct sq)

case mpr
C : Type u_1
inst✝ : Category C
A B X Y : C
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ Nonempty (LiftStruct sq) → HasLift sq
Theorem: LinearMap.mem_skewAdjointSubmodule
File: Mathlib/LinearAlgebra/SesquilinearForm.lean

tactic: rw [isSkewAdjoint_iff_neg_self_adjoint]
state_before: R : Type u_1
R₁ : Type ?u.455798
R₂ : Type ?u.455801
R₃ : Type ?u.455804
M : Type u_2
M₁ : Type ?u.455810
M₂ : Type ?u.455813
Mₗ₁ : Type ?u.455816
Mₗ₁' : Type ?u.455819
Mₗ₂ : Type ?u.455822
Mₗ₂' : Type ?u.455825
K : Type ?u.455828
K₁ : Type ?u.455831
K₂ : Type ?u.455834
V : Type ?u.455837
V₁ : Type ?u.455840
V₂ : Type ?u.455843
n : Type ?u.455846
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M₁
inst✝ : Module R M₁
B F : M →ₗ[R] M →ₗ[R] R
f : Module.End R M
⊢ f ∈ skewAdjointSubmodule B ↔ IsSkewAdjoint B f

tactic: exact Iff.rfl
state_before: R : Type u_1
R₁ : Type ?u.455798
R₂ : Type ?u.455801
R₃ : Type ?u.455804
M : Type u_2
M₁ : Type ?u.455810
M₂ : Type ?u.455813
Mₗ₁ : Type ?u.455816
Mₗ₁' : Type ?u.455819
Mₗ₂ : Type ?u.455822
Mₗ₂' : Type ?u.455825
K : Type ?u.455828
K₁ : Type ?u.455831
K₂ : Type ?u.455834
V : Type ?u.455837
V₁ : Type ?u.455840
V₂ : Type ?u.455843
n : Type ?u.455846
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M₁
inst✝ : Module R M₁
B F : M →ₗ[R] M →ₗ[R] R
f : Module.End R M
⊢ f ∈ skewAdjointSubmodule B ↔ IsAdjointPair (-B) B f f
Theorem: Nat.dist_add_add_left
File: Mathlib/Data/Nat/Dist.lean

tactic: rw [add_comm k n, add_comm k m]
state_before: k n m : ℕ
⊢ dist (k + n) (k + m) = dist n m

tactic: apply dist_add_add_right
state_before: k n m : ℕ
⊢ dist (n + k) (m + k) = dist n m
Theorem: Subgroup.comap_id
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: ext
state_before: G : Type ?u.238328
G' : Type ?u.238331
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.238340
inst✝² : AddGroup A
H K✝ : Subgroup G
k : Set G
N : Type u_1
inst✝¹ : Group N
P : Type ?u.238367
inst✝ : Group P
K : Subgroup N
⊢ comap (MonoidHom.id N) K = K

tactic: rfl
state_before: case h
G : Type ?u.238328
G' : Type ?u.238331
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.238340
inst✝² : AddGroup A
H K✝ : Subgroup G
k : Set G
N : Type u_1
inst✝¹ : Group N
P : Type ?u.238367
inst✝ : Group P
K : Subgroup N
x✝ : N
⊢ x✝ ∈ comap (MonoidHom.id N) K ↔ x✝ ∈ K
Theorem: OrderIso.preimage_Ioi
File: Mathlib/Data/Set/Intervals/OrderIso.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
b : β
⊢ ↑e ⁻¹' Ioi b = Ioi (↑(symm e) b)

tactic: simp [← e.lt_iff_lt]
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
b : β
x : α
⊢ x ∈ ↑e ⁻¹' Ioi b ↔ x ∈ Ioi (↑(symm e) b)
Theorem: List.prod_erase
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: obtain rfl | ⟨ne, h⟩ := Decidable.List.eq_or_ne_mem_of_mem h
state_before: ι : Type ?u.150239
α : Type ?u.150242
M : Type u_1
N : Type ?u.150248
P : Type ?u.150251
M₀ : Type ?u.150254
G : Type ?u.150257
R : Type ?u.150260
inst✝¹ : DecidableEq M
inst✝ : CommMonoid M
a b : M
l : List M
h : a ∈ b :: l
⊢ a * prod (List.erase (b :: l) a) = prod (b :: l)

tactic: simp only [List.erase, if_pos, prod_cons, beq_self_eq_true]
state_before: case inl
ι : Type ?u.150239
α : Type ?u.150242
M : Type u_1
N : Type ?u.150248
P : Type ?u.150251
M₀ : Type ?u.150254
G : Type ?u.150257
R : Type ?u.150260
inst✝¹ : DecidableEq M
inst✝ : CommMonoid M
a : M
l : List M
h : a ∈ a :: l
⊢ a * prod (List.erase (a :: l) a) = prod (a :: l)

tactic: simp only [List.erase, beq_false_of_ne ne.symm, prod_cons, prod_erase h, mul_left_comm a b]
state_before: case inr.intro
ι : Type ?u.150239
α : Type ?u.150242
M : Type u_1
N : Type ?u.150248
P : Type ?u.150251
M₀ : Type ?u.150254
G : Type ?u.150257
R : Type ?u.150260
inst✝¹ : DecidableEq M
inst✝ : CommMonoid M
a b : M
l : List M
h✝ : a ∈ b :: l
ne : a ≠ b
h : a ∈ l
⊢ a * prod (List.erase (b :: l) a) = prod (b :: l)
Theorem: Zsqrtd.smul_im
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simp
state_before: d a : ℤ
b : ℤ√d
⊢ (↑a * b).im = a * b.im
Theorem: Real.exp_mul
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [rpow_def_of_pos (exp_pos _), log_exp]
state_before: x y : ℝ
⊢ exp (x * y) = exp x ^ y
Theorem: Polynomial.add_modByMonic
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: by_cases hq : q.Monic
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
p₁ p₂ : R[X]
⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q

tactic: cases' subsingleton_or_nontrivial R with hR hR
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
p₁ p₂ : R[X]
hq : Monic q
⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q

tactic: simp only [eq_iff_true_of_subsingleton]
state_before: case pos.inl
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
p₁ p₂ : R[X]
hq : Monic q
hR : Subsingleton R
⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q

tactic: exact
(div_modByMonic_unique (p₁ /ₘ q + p₂ /ₘ q) _ hq
    ⟨by
      rw [mul_add, add_left_comm, add_assoc, modByMonic_add_div _ hq, ← add_assoc,
        add_comm (q * _), modByMonic_add_div _ hq],
      (degree_add_le _ _).trans_lt
        (max_lt (degree_modByMonic_lt _ hq) (degree_modByMonic_lt _ hq))⟩).2
state_before: case pos.inr
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
p₁ p₂ : R[X]
hq : Monic q
hR : Nontrivial R
⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q

tactic: rw [mul_add, add_left_comm, add_assoc, modByMonic_add_div _ hq, ← add_assoc,
  add_comm (q * _), modByMonic_add_div _ hq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
p₁ p₂ : R[X]
hq : Monic q
hR : Nontrivial R
⊢ p₁ %ₘ q + p₂ %ₘ q + q * (p₁ /ₘ q + p₂ /ₘ q) = p₁ + p₂

tactic: simp_rw [modByMonic_eq_of_not_monic _ hq]
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
p₁ p₂ : R[X]
hq : ¬Monic q
⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q
Theorem: existsUnique_sub_zsmul_mem_Ioc
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: simpa only [Equiv.neg_apply, neg_zsmul, sub_neg_eq_add] using
  existsUnique_add_zsmul_mem_Ioc ha b c
state_before: α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
b c : α
⊢ ∃! x, b - ↑(Equiv.neg ℤ) x • a ∈ Ioc c (c + a)
Theorem: Cardinal.power_nat_le_max
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: cases' le_or_lt ℵ₀ c with hc hc
state_before: c : Cardinal
n : ℕ
⊢ c ^ ↑n ≤ max c ℵ₀

tactic: exact le_max_of_le_left (power_nat_le hc)
state_before: case inl
c : Cardinal
n : ℕ
hc : ℵ₀ ≤ c
⊢ c ^ ↑n ≤ max c ℵ₀

tactic: exact le_max_of_le_right (power_lt_aleph0 hc (nat_lt_aleph0 _)).le
state_before: case inr
c : Cardinal
n : ℕ
hc : c < ℵ₀
⊢ c ^ ↑n ≤ max c ℵ₀
Theorem: FreeProduct.Word.prod_rcons
File: Mathlib/GroupTheory/FreeProduct.lean

tactic: rw [rcons, dif_pos hm, hm, MonoidHom.map_one, one_mul]
state_before: ι : Type u_1
M : ι → Type u_2
inst✝² : (i : ι) → Monoid (M i)
N : Type ?u.392300
inst✝¹ : Monoid N
inst✝ : (i : ι) → DecidableEq (M i)
i : ι
p : Pair M i
hm : p.head = 1
⊢ prod (rcons p) = ↑of p.head * prod p.tail

tactic: rw [rcons, dif_neg hm, prod, List.map_cons, List.prod_cons, prod]
state_before: ι : Type u_1
M : ι → Type u_2
inst✝² : (i : ι) → Monoid (M i)
N : Type ?u.392300
inst✝¹ : Monoid N
inst✝ : (i : ι) → DecidableEq (M i)
i : ι
p : Pair M i
hm : ¬p.head = 1
⊢ prod (rcons p) = ↑of p.head * prod p.tail
Theorem: List.mem_getLast?_eq_getLast
File: Mathlib/Data/List/Basic.lean

tactic: simp at hx
state_before: ι : Type ?u.35296
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
x : α
hx : x ∈ getLast? []
⊢ False

tactic: simpa using hx
state_before: ι : Type ?u.35296
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a x : α
hx : x ∈ getLast? [a]
⊢ a = x

tactic: rw [getLast?_cons_cons] at hx
state_before: ι : Type ?u.35296
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
x : α
hx : x ∈ getLast? (a :: b :: l)
⊢ ∃ h, x = getLast (a :: b :: l) h

tactic: rcases mem_getLast?_eq_getLast hx with ⟨_, h₂⟩
state_before: ι : Type ?u.35296
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
x : α
hx : x ∈ getLast? (b :: l)
⊢ ∃ h, x = getLast (a :: b :: l) h

tactic: use cons_ne_nil _ _
state_before: case intro
ι : Type ?u.35296
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
x : α
hx : x ∈ getLast? (b :: l)
w✝ : b :: l ≠ []
h₂ : x = getLast (b :: l) w✝
⊢ ∃ h, x = getLast (a :: b :: l) h

tactic: assumption
state_before: case intro
ι : Type ?u.35296
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
x : α
hx : x ∈ getLast? (b :: l)
w✝ : b :: l ≠ []
h₂ : x = getLast (b :: l) w✝
⊢ x = getLast (a :: b :: l) (_ : a :: b :: l ≠ [])
Theorem: PowerSeries.map_sin
File: Mathlib/RingTheory/PowerSeries/WellKnown.lean

tactic: ext
state_before: A : Type u_2
A' : Type u_1
inst✝⁷ : Ring A
inst✝⁶ : Ring A'
inst✝⁵ : Algebra ℚ A
inst✝⁴ : Algebra ℚ A'
inst✝³ : Ring A
inst✝² : Ring A'
inst✝¹ : Algebra ℚ A
inst✝ : Algebra ℚ A'
n : ℕ
f : A →+* A'
⊢ ↑(map f) (sin A) = sin A'

tactic: simp [sin, apply_ite f]
state_before: case h
A : Type u_2
A' : Type u_1
inst✝⁷ : Ring A
inst✝⁶ : Ring A'
inst✝⁵ : Algebra ℚ A
inst✝⁴ : Algebra ℚ A'
inst✝³ : Ring A
inst✝² : Ring A'
inst✝¹ : Algebra ℚ A
inst✝ : Algebra ℚ A'
n : ℕ
f : A →+* A'
n✝ : ℕ
⊢ ↑(coeff A' n✝) (↑(map f) (sin A)) = ↑(coeff A' n✝) (sin A')
Theorem: IsometryEquiv.coe_toRealAffineIsometryEquiv
File: Mathlib/Analysis/NormedSpace/MazurUlam.lean

tactic: ext
state_before: E : Type u_3
PE : Type u_1
F : Type u_4
PF : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : MetricSpace PE
inst✝⁴ : NormedAddTorsor E PE
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : MetricSpace PF
inst✝ : NormedAddTorsor F PF
f : PE ≃ᵢ PF
⊢ toIsometryEquiv (toRealAffineIsometryEquiv f) = f

tactic: rfl
state_before: case H
E : Type u_3
PE : Type u_1
F : Type u_4
PF : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : MetricSpace PE
inst✝⁴ : NormedAddTorsor E PE
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : MetricSpace PF
inst✝ : NormedAddTorsor F PF
f : PE ≃ᵢ PF
x✝ : PE
⊢ ↑(toIsometryEquiv (toRealAffineIsometryEquiv f)) x✝ = ↑f x✝
Theorem: Int.subNatNat_of_sub_eq_zero
File: Std/Data/Int/Lemmas.lean

tactic: rw [subNatNat, h, ofNat_eq_coe]
state_before: m n : Nat
h : n - m = 0
⊢ subNatNat m n = ↑(m - n)
Theorem: Finset.image₂_eq_empty_iff
File: Mathlib/Data/Finset/NAry.lean

tactic: simp_rw [← not_nonempty_iff_eq_empty, image₂_nonempty_iff, not_and_or]
state_before: α : Type u_2
α' : Type ?u.25342
β : Type u_3
β' : Type ?u.25348
γ : Type u_1
γ' : Type ?u.25354
δ : Type ?u.25357
δ' : Type ?u.25360
ε : Type ?u.25363
ε' : Type ?u.25366
ζ : Type ?u.25369
ζ' : Type ?u.25372
ν : Type ?u.25375
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 : γ
⊢ image₂ f s t = ∅ ↔ s = ∅ ∨ t = ∅
Theorem: ExistsUnique.unique₂
File: Mathlib/Logic/Basic.lean

tactic: simp only [exists_unique_iff_exists] at h
state_before: ι : Sort ?u.25704
α✝ : Sort ?u.25709
κ : ι → Sort ?u.25706
p✝ q✝ : α✝ → Prop
α : Sort u_1
p : α → Sort u_2
inst✝ : ∀ (x : α), Subsingleton (p x)
q : (x : α) → p x → Prop
h : ∃! x hx, q x hx
y₁ y₂ : α
hpy₁ : p y₁
hqy₁ : q y₁ hpy₁
hpy₂ : p y₂
hqy₂ : q y₂ hpy₂
⊢ y₁ = y₂

tactic: exact h.unique ⟨hpy₁, hqy₁⟩ ⟨hpy₂, hqy₂⟩
state_before: ι : Sort ?u.25704
α✝ : Sort ?u.25709
κ : ι → Sort ?u.25706
p✝ q✝ : α✝ → Prop
α : Sort u_1
p : α → Sort u_2
inst✝ : ∀ (x : α), Subsingleton (p x)
q : (x : α) → p x → Prop
y₁ y₂ : α
hpy₁ : p y₁
hqy₁ : q y₁ hpy₁
hpy₂ : p y₂
hqy₂ : q y₂ hpy₂
h : ∃! x, ∃ hx, q x hx
⊢ y₁ = y₂
Theorem: inf_symmDiff_distrib_right
File: Mathlib/Order/SymmDiff.lean

tactic: simp_rw [@inf_comm _ _ _ c, inf_symmDiff_distrib_left]
state_before: ι : Type ?u.60714
α : Type u_1
β : Type ?u.60720
π : ι → Type ?u.60725
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ b ⊓ c = (a ⊓ c) ∆ (b ⊓ c)
Theorem: Polynomial.smul_monomial
File: Mathlib/Data/Polynomial/Basic.lean

tactic: simp
state_before: R : Type u
a✝ b✝ : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q : R[X]
S : Type u_1
inst✝ : SMulZeroClass S R
a : S
n : ℕ
b : R
⊢ (a • ↑(monomial n) b).toFinsupp = (↑(monomial n) (a • b)).toFinsupp

tactic: rw [smul_single]
state_before: R : Type u
a✝ b✝ : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q : R[X]
S : Type u_1
inst✝ : SMulZeroClass S R
a : S
n : ℕ
b : R
⊢ a • Finsupp.single n b = Finsupp.single n (a • b)
Theorem: Polynomial.addHom_ext
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rintro p ⟨n, a, rfl⟩
state_before: R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q : R[X]
M : Type u_1
inst✝ : AddMonoid M
f g : R[X] →+ M
h : ∀ (n : ℕ) (a : R), ↑f (↑(monomial n) a) = ↑g (↑(monomial n) a)
⊢ Set.EqOn ↑f ↑g {p | ∃ n a, p = ↑(monomial n) a}

tactic: exact h n a
state_before: case intro.intro
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q : R[X]
M : Type u_1
inst✝ : AddMonoid M
f g : R[X] →+ M
h : ∀ (n : ℕ) (a : R), ↑f (↑(monomial n) a) = ↑g (↑(monomial n) a)
n : ℕ
a : R
⊢ ↑f (↑(monomial n) a) = ↑g (↑(monomial n) a)
Theorem: Icc_ofDual
File: Mathlib/Order/LocallyFinite.lean

tactic: refine' Eq.trans _ map_refl.symm
state_before: α : Type u_1
β : Type ?u.114384
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Icc (↑ofDual a) (↑ofDual b) = map (Equiv.toEmbedding ofDual) (Icc b a)

tactic: ext c
state_before: α : Type u_1
β : Type ?u.114384
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Icc (↑ofDual a) (↑ofDual b) = Icc b a

tactic: rw [mem_Icc, mem_Icc (α := αᵒᵈ)]
state_before: case a
α : Type u_1
β : Type ?u.114384
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : (fun x => α) a
⊢ c ∈ Icc (↑ofDual a) (↑ofDual b) ↔ c ∈ Icc b a

tactic: exact and_comm
state_before: case a
α : Type u_1
β : Type ?u.114384
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : (fun x => α) a
⊢ ↑ofDual a ≤ c ∧ c ≤ ↑ofDual b ↔ b ≤ c ∧ c ≤ a
Theorem: IsScalarTower.adjoin_range_toAlgHom
File: Mathlib/Algebra/Algebra/Subalgebra/Tower.lean

tactic: suffices Set.range (algebraMap (toAlgHom R S A).range A) = Set.range (algebraMap S A) by
  rw [this]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring S
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R S A
t : Set A
z : A
⊢ z ∈ Subsemiring.closure (Set.range ↑(algebraMap { x // x ∈ AlgHom.range (toAlgHom R S A) } A) ∪ t) ↔
    z ∈ Subsemiring.closure (Set.range ↑(algebraMap S A) ∪ t)

tactic: ext z
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring S
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R S A
t : Set A
z : A
⊢ Set.range ↑(algebraMap { x // x ∈ AlgHom.range (toAlgHom R S A) } A) = Set.range ↑(algebraMap S A)

tactic: exact ⟨fun ⟨⟨_, y, h1⟩, h2⟩ ↦ ⟨y, h2 ▸ h1⟩, fun ⟨y, hy⟩ ↦ ⟨⟨z, y, hy⟩, rfl⟩⟩
state_before: case h
R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring S
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R S A
t : Set A
z✝ z : A
⊢ z ∈ Set.range ↑(algebraMap { x // x ∈ AlgHom.range (toAlgHom R S A) } A) ↔ z ∈ Set.range ↑(algebraMap S A)

tactic: rw [this]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring S
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R S A
t : Set A
z : A
this : Set.range ↑(algebraMap { x // x ∈ AlgHom.range (toAlgHom R S A) } A) = Set.range ↑(algebraMap S A)
⊢ z ∈ Subsemiring.closure (Set.range ↑(algebraMap { x // x ∈ AlgHom.range (toAlgHom R S A) } A) ∪ t) ↔
    z ∈ Subsemiring.closure (Set.range ↑(algebraMap S A) ∪ t)
Theorem: List.Sublist.eraseP
File: Std/Data/List/Lemmas.lean

tactic: by_cases h : p a <;> simp [h]
state_before: α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
⊢ List.eraseP p l₁ <+ List.eraseP p (a :: l₂✝)

tactic: exacts [s.eraseP.trans (eraseP_sublist _), s.eraseP.cons _]
state_before: case pos
α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
h : p a = true
⊢ List.eraseP p l₁ <+ l₂✝

case neg
α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
h : ¬p a = true
⊢ List.eraseP p l₁ <+ a :: List.eraseP p l₂✝

tactic: by_cases h : p a <;> simp [h]
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
⊢ List.eraseP p (a :: l₁✝) <+ List.eraseP p (a :: l₂✝)

tactic: exacts [s, s.eraseP.cons₂ _]
state_before: case pos
α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : p a = true
⊢ l₁✝ <+ l₂✝

case neg
α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : ¬p a = true
⊢ a :: List.eraseP p l₁✝ <+ a :: List.eraseP p l₂✝
Theorem: Ordinal.lift.principalSeg_top'
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: simp only [lift.principalSeg_top, univ_id]
state_before: α : Type ?u.219643
β : Type ?u.219646
γ : Type ?u.219649
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ principalSeg.top = type fun x x_1 => x < x_1
Theorem: MeasureTheory.Measure.haar.mem_prehaar_empty
File: Mathlib/MeasureTheory/Measure/Haar/Basic.lean

tactic: simp only [haarProduct, Set.pi, forall_prop_of_true, mem_univ, mem_setOf_eq]
state_before: G : Type u_1
inst✝¹ : Group G
inst✝ : TopologicalSpace G
K₀ : Set G
f : Compacts G → ℝ
⊢ f ∈ haarProduct K₀ ↔ ∀ (K : Compacts G), f K ∈ Icc 0 ↑(index (↑K) K₀)
Theorem: affineSpan_pair_le_of_mem_of_mem
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [affineSpan_le, Set.insert_subset, Set.singleton_subset_iff]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.482981
p₁ p₂ : P
s : AffineSubspace k P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
⊢ affineSpan k {p₁, p₂} ≤ s

tactic: exact ⟨hp₁, hp₂⟩
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.482981
p₁ p₂ : P
s : AffineSubspace k P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
⊢ p₁ ∈ ↑s ∧ p₂ ∈ ↑s
Theorem: Set.image_inter_preimage
File: Mathlib/Data/Set/Image.lean

tactic: apply Subset.antisymm
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.51943
ι : Sort ?u.51946
ι' : Sort ?u.51949
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s : Set α
t : Set β
⊢ f '' (s ∩ f ⁻¹' t) = f '' s ∩ t

tactic: calc
  f '' (s ∩ f ⁻¹' t) ⊆ f '' s ∩ f '' (f ⁻¹' t) := image_inter_subset _ _ _
  _ ⊆ f '' s ∩ t := inter_subset_inter_right _ (image_preimage_subset f t)
state_before: case h₁
α : Type u_1
β : Type u_2
γ : Type ?u.51943
ι : Sort ?u.51946
ι' : Sort ?u.51949
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s : Set α
t : Set β
⊢ f '' (s ∩ f ⁻¹' t) ⊆ f '' s ∩ t

tactic: rintro _ ⟨⟨x, h', rfl⟩, h⟩
state_before: case h₂
α : Type u_1
β : Type u_2
γ : Type ?u.51943
ι : Sort ?u.51946
ι' : Sort ?u.51949
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s : Set α
t : Set β
⊢ f '' s ∩ t ⊆ f '' (s ∩ f ⁻¹' t)

tactic: exact ⟨x, ⟨h', h⟩, rfl⟩
state_before: case h₂.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.51943
ι : Sort ?u.51946
ι' : Sort ?u.51949
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s : Set α
t : Set β
x : α
h' : x ∈ s
h : f x ∈ t
⊢ f x ∈ f '' (s ∩ f ⁻¹' t)
Theorem: inner_re_zero_left
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: simp only [inner_zero_left, AddMonoidHom.map_zero]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1520885
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
⊢ ↑re (inner 0 x) = 0
Theorem: Filter.generate_eq_biInf
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [le_generate_iff, le_principal_iff, subset_def]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.79430
ι : Sort x
f✝ g : Filter α
s t : Set α
S : Set (Set α)
f : Filter α
⊢ f ≤ generate S ↔ f ≤ ⨅ (s : Set α) (_ : s ∈ S), 𝓟 s
Theorem: List.dropLast_append_getLast
File: Mathlib/Data/List/Basic.lean

tactic: rw [dropLast_cons_cons, cons_append, getLast_cons (cons_ne_nil _ _)]
state_before: ι : Type ?u.30890
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
h : a :: b :: l ≠ []
⊢ dropLast (a :: b :: l) ++ [getLast (a :: b :: l) h] = a :: b :: l

tactic: congr
state_before: ι : Type ?u.30890
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
h : a :: b :: l ≠ []
⊢ a :: (dropLast (b :: l) ++ [getLast (b :: l) (_ : b :: l ≠ [])]) = a :: b :: l

tactic: exact dropLast_append_getLast (cons_ne_nil b l)
state_before: case e_tail
ι : Type ?u.30890
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
h : a :: b :: l ≠ []
⊢ dropLast (b :: l) ++ [getLast (b :: l) (_ : b :: l ≠ [])] = b :: l
Theorem: NNReal.rpow_le_self_of_le_one
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rcases eq_bot_or_bot_lt x with (rfl | (h : 0 < x))
state_before: x : ℝ≥0
z : ℝ
hx : x ≤ 1
h_one_le : 1 ≤ z
⊢ x ^ z ≤ x

tactic: nth_rw 2 [← NNReal.rpow_one x]
state_before: case inr
x : ℝ≥0
z : ℝ
hx : x ≤ 1
h_one_le : 1 ≤ z
h : 0 < x
⊢ x ^ z ≤ x

tactic: exact NNReal.rpow_le_rpow_of_exponent_ge h hx h_one_le
state_before: case inr
x : ℝ≥0
z : ℝ
hx : x ≤ 1
h_one_le : 1 ≤ z
h : 0 < x
⊢ x ^ z ≤ x ^ 1

tactic: have : z ≠ 0 := by linarith
state_before: case inl
z : ℝ
h_one_le : 1 ≤ z
hx : ⊥ ≤ 1
⊢ ⊥ ^ z ≤ ⊥

tactic: simp [this]
state_before: case inl
z : ℝ
h_one_le : 1 ≤ z
hx : ⊥ ≤ 1
this : z ≠ 0
⊢ ⊥ ^ z ≤ ⊥

tactic: linarith
state_before: z : ℝ
h_one_le : 1 ≤ z
hx : ⊥ ≤ 1
⊢ z ≠ 0