tasksource/leandojo huggingface dataset:
Theorem: List.Nodup.diff_eq_filter
File: Mathlib/Data/List/Nodup.lean

tactic: simp
state_before: α : Type u
β : Type v
l l₁✝ l₂ : List α
r : α → α → Prop
a b : α
inst✝ : DecidableEq α
l₁ : List α
x✝ : Nodup l₁
⊢ List.diff l₁ [] = List.filter (fun x => decide ¬x ∈ []) l₁

tactic: rw [diff_cons, (hl₁.erase _).diff_eq_filter, hl₁.erase_eq_filter, filter_filter]
state_before: α : Type u
β : Type v
l l₁✝ l₂✝ : List α
r : α → α → Prop
a✝ b : α
inst✝ : DecidableEq α
l₁ : List α
a : α
l₂ : List α
hl₁ : Nodup l₁
⊢ List.diff l₁ (a :: l₂) = List.filter (fun x => decide ¬x ∈ a :: l₂) l₁

tactic: simp only [decide_not, Bool.not_eq_true', decide_eq_false_iff_not, ne_eq, and_comm,
  Bool.decide_and, find?, mem_cons, not_or]
state_before: α : Type u
β : Type v
l l₁✝ l₂✝ : List α
r : α → α → Prop
a✝ b : α
inst✝ : DecidableEq α
l₁ : List α
a : α
l₂ : List α
hl₁ : Nodup l₁
⊢ List.filter (fun a_1 => decide ((decide ¬a_1 ∈ l₂) = true ∧ decide (a_1 ≠ a) = true)) l₁ =
    List.filter (fun x => decide ¬x ∈ a :: l₂) l₁
Theorem: Inducing.continuousOn_iff
File: Mathlib/Topology/ContinuousOn.lean

tactic: simp_rw [ContinuousOn, hg.continuousWithinAt_iff]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.350648
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
g : β → γ
hg : Inducing g
s : Set α
⊢ ContinuousOn f s ↔ ContinuousOn (g ∘ f) s
Theorem: CategoryTheory.Functor.congr_obj
File: Mathlib/CategoryTheory/EqToHom.lean

tactic: rw [h]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F G : C ⥤ D
h : F = G
X : C
⊢ F.obj X = G.obj X
Theorem: Stream'.tails_eq
File: Mathlib/Data/Stream/Init.lean

tactic: unfold tails
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ tails s = tail s :: tails (tail s)

tactic: rw [corec_eq]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ corec id tail (tail s) = tail s :: corec id tail (tail (tail s))

tactic: rfl
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ id (tail s) :: corec id tail (tail (tail s)) = tail s :: corec id tail (tail (tail s))
Theorem: Interval.mem_pure
File: Mathlib/Order/Interval.lean

tactic: rw [← SetLike.mem_coe, coe_pure, mem_singleton_iff]
state_before: α : Type u_1
β : Type ?u.29168
γ : Type ?u.29171
δ : Type ?u.29174
ι : Sort ?u.29177
κ : ι → Sort ?u.29182
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
⊢ b ∈ pure a ↔ b = a
Theorem: Ideal.map_eq_bot_iff_le_ker
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [RingHom.ker, eq_bot_iff, map_le_iff_le_comap]
state_before: R : Type u_1
S : Type u_2
F : Type u_3
inst✝¹ : Semiring R
inst✝ : Semiring S
rc : RingHomClass F R S
I : Ideal R
f : F
⊢ map f I = ⊥ ↔ I ≤ RingHom.ker f
Theorem: Set.einfsep_top
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: simp_rw [einfsep, iInf_eq_top]
state_before: α : Type u_1
β : Type ?u.7436
inst✝ : EDist α
x y : α
s t : Set α
⊢ einfsep s = ⊤ ↔ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → edist x y = ⊤
Theorem: List.getLast_reverse
File: Mathlib/Data/List/Basic.lean

tactic: contrapose! hl
state_before: ι : Type ?u.484228
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
hl : reverse l ≠ []
⊢ 0 < length l

tactic: simpa [length_eq_zero] using hl
state_before: ι : Type ?u.484228
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
hl : length l ≤ 0
⊢ reverse l = []

tactic: rw [getLast_eq_get, get_reverse']
state_before: ι : Type ?u.484228
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
hl : reverse l ≠ []
hl' : optParam (0 < length l) (_ : 0 < length l)
⊢ getLast (reverse l) hl = get l { val := 0, isLt := hl' }

tactic: simp
state_before: ι : Type ?u.484228
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
hl : reverse l ≠ []
hl' : optParam (0 < length l) (_ : 0 < length l)
⊢ get l
      {
        val :=
          length l - 1 - ↑{ val := length (reverse l) - 1, isLt := (_ : length (reverse l) - 1 < length (reverse l)) },
        isLt := ?hn' } =
    get l { val := 0, isLt := hl' }

tactic: simpa using hl'
state_before: case hn'
ι : Type ?u.484228
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
hl : reverse l ≠ []
hl' : optParam (0 < length l) (_ : 0 < length l)
⊢ length l - 1 - ↑{ val := length (reverse l) - 1, isLt := (_ : length (reverse l) - 1 < length (reverse l)) } <
    length l
Theorem: EuclideanDomain.gcd_eq_zero_iff
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: simpa [h] using gcd_dvd a b
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
h : gcd a b = 0
⊢ a = 0 ∧ b = 0

tactic: rintro ⟨rfl, rfl⟩
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
⊢ a = 0 ∧ b = 0 → gcd a b = 0

tactic: exact gcd_zero_right _
state_before: case intro
R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
⊢ gcd 0 0 = 0
Theorem: LinearOrderedField.smul_Ioc
File: Mathlib/Algebra/Order/Pointwise.lean

tactic: ext x
state_before: α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
⊢ r • Ioc a b = Ioc (r • a) (r • b)

tactic: simp only [mem_smul_set, smul_eq_mul, mem_Ioc]
state_before: case h
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ r • Ioc a b ↔ x ∈ Ioc (r • a) (r • b)

tactic: constructor
state_before: case h
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y, (a < y ∧ y ≤ b) ∧ r * y = x) ↔ r * a < x ∧ x ≤ r * b

tactic: rintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩
state_before: case h.mp
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y, (a < y ∧ y ≤ b) ∧ r * y = x) → r * a < x ∧ x ≤ r * b

tactic: constructor
state_before: case h.mp.intro.intro.intro
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ < a
a_h_left_right : a ≤ b
⊢ r * a✝ < r * a ∧ r * a ≤ r * b

tactic: exact (mul_lt_mul_left hr).mpr a_h_left_left
state_before: case h.mp.intro.intro.intro.left
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ < a
a_h_left_right : a ≤ b
⊢ r * a✝ < r * a

case h.mp.intro.intro.intro.right
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ < a
a_h_left_right : a ≤ b
⊢ r * a ≤ r * b

tactic: exact (mul_le_mul_left hr).mpr a_h_left_right
state_before: case h.mp.intro.intro.intro.right
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ < a
a_h_left_right : a ≤ b
⊢ r * a ≤ r * b

tactic: rintro ⟨a_left, a_right⟩
state_before: case h.mpr
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ r * a < x ∧ x ≤ r * b → ∃ y, (a < y ∧ y ≤ b) ∧ r * y = x

tactic: use x / r
state_before: case h.mpr.intro
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
a_left : r * a < x
a_right : x ≤ r * b
⊢ ∃ y, (a < y ∧ y ≤ b) ∧ r * y = x

tactic: refine' ⟨⟨(lt_div_iff' hr).mpr a_left, (div_le_iff' hr).mpr a_right⟩, _⟩
state_before: case h.mpr.intro
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
a_left : r * a < x
a_right : x ≤ r * b
⊢ (a < x / r ∧ x / r ≤ b) ∧ r * (x / r) = x

tactic: rw [mul_div_cancel' _ (ne_of_gt hr)]
state_before: case h.mpr.intro
α : Type ?u.59044
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
a_left : r * a < x
a_right : x ≤ r * b
⊢ r * (x / r) = x
Theorem: LieModuleHom.map_lie₂
File: Mathlib/Algebra/Lie/Basic.lean

tactic: simp only [sub_add_cancel, map_lie, LieHom.lie_apply]
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f : M →ₗ⁅R,L⁆ N →ₗ[R] P
x : L
m : M
n : N
⊢ ⁅x, ↑(↑f m) n⁆ = ↑(↑f ⁅x, m⁆) n + ↑(↑f m) ⁅x, n⁆
Theorem: IsROrC.conj_ofReal
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [ext_iff]
state_before: K : Type u_1
E : Type ?u.2663909
inst✝ : IsROrC K
r : ℝ
⊢ ↑(starRingEnd K) ↑r = ↑r

tactic: simp only [ofReal_im, conj_im, eq_self_iff_true, conj_re, and_self_iff, neg_zero]
state_before: K : Type u_1
E : Type ?u.2663909
inst✝ : IsROrC K
r : ℝ
⊢ ↑re (↑(starRingEnd K) ↑r) = ↑re ↑r ∧ ↑im (↑(starRingEnd K) ↑r) = ↑im ↑r
Theorem: ContDiffAt.eventually
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: simpa [nhdsWithin_univ] using ContDiffWithinAt.eventually h
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
n : ℕ
h : ContDiffAt 𝕜 (↑n) f x
⊢ ∀ᶠ (y : E) in 𝓝 x, ContDiffAt 𝕜 (↑n) f y
Theorem: Metric.Bounded.inv
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp_rw [bounded_iff_forall_norm_le', ← image_inv, ball_image_iff, norm_inv']
state_before: E : Type u_1
inst✝ : SeminormedGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ Bounded s → Bounded s⁻¹

tactic: exact id
state_before: E : Type u_1
inst✝ : SeminormedGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ (∃ C, ∀ (x : E), x ∈ s → ‖x‖ ≤ C) → ∃ C, ∀ (x : E), x ∈ s → ‖x‖ ≤ C
Theorem: Set.powerset_singleton
File: Mathlib/Data/Set/Basic.lean

tactic: ext y
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : α
⊢ 𝒫{x} = {∅, {x}}

tactic: rw [mem_powerset_iff, subset_singleton_iff_eq, mem_insert_iff, mem_singleton_iff]
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : α
y : Set α
⊢ y ∈ 𝒫{x} ↔ y ∈ {∅, {x}}
Theorem: MeasureTheory.iSup_lintegral_le
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: simp only [← iSup_apply]
state_before: α : Type u_2
β : Type ?u.277142
γ : Type ?u.277145
δ : Type ?u.277148
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_1
f : ι → α → ℝ≥0∞
⊢ (⨆ (i : ι), ∫⁻ (a : α), f i a ∂μ) ≤ ∫⁻ (a : α), ⨆ (i : ι), f i a ∂μ

tactic: exact (monotone_lintegral μ).le_map_iSup
state_before: α : Type u_2
β : Type ?u.277142
γ : Type ?u.277145
δ : Type ?u.277148
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_1
f : ι → α → ℝ≥0∞
⊢ (⨆ (i : ι), ∫⁻ (a : α), f i a ∂μ) ≤ ∫⁻ (a : α), iSup (fun i => f i) a ∂μ
Theorem: coe_finRotate
File: Mathlib/Logic/Equiv/Fin.lean

tactic: rw [finRotate_succ_apply, Fin.val_add_one i]
state_before: m n : ℕ
i : Fin (Nat.succ n)
⊢ ↑(↑(finRotate (Nat.succ n)) i) = if i = Fin.last n then 0 else ↑i + 1
Theorem: Gamma_one_top
File: Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean

tactic: ext
state_before: N : ℕ
⊢ Gamma 1 = ⊤

tactic: simp
state_before: case h
N : ℕ
x✝ : SL(2, ℤ)
⊢ x✝ ∈ Gamma 1 ↔ x✝ ∈ ⊤
Theorem: List.mem_rotate
File: Mathlib/Data/List/Rotate.lean

tactic: simp
state_before: α : Type u
x✝ : α
n : ℕ
⊢ x✝ ∈ rotate [] n ↔ x✝ ∈ []

tactic: simp
state_before: α : Type u
a : α
l : List α
x✝ : α
⊢ x✝ ∈ rotate (a :: l) 0 ↔ x✝ ∈ a :: l

tactic: simp [rotate_cons_succ, mem_rotate, or_comm]
state_before: α : Type u
a : α
l : List α
x✝ : α
n : ℕ
⊢ x✝ ∈ rotate (a :: l) (n + 1) ↔ x✝ ∈ a :: l
Theorem: LinearMap.det_toLin
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: rw [← LinearMap.det_toMatrix b, LinearMap.toMatrix_toLin]
state_before: R : Type u_2
inst✝⁹ : CommRing R
M : Type u_3
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M' : Type ?u.521225
inst✝⁶ : AddCommGroup M'
inst✝⁵ : Module R M'
ι : Type u_1
inst✝⁴ : DecidableEq ι
inst✝³ : Fintype ι
e : Basis ι R M
A : Type ?u.522245
inst✝² : CommRing A
inst✝¹ : Module A M
κ : Type ?u.522743
inst✝ : Fintype κ
b : Basis ι R M
f : Matrix ι ι R
⊢ ↑LinearMap.det (↑(toLin b b) f) = det f
Theorem: Real.Angle.toReal_eq_pi_div_two_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← toReal_inj, toReal_pi_div_two]
state_before: θ : Angle
⊢ toReal θ = π / 2 ↔ θ = ↑(π / 2)
Theorem: Finset.prod_range_induction
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: induction' n with k hk
state_before: ι : Type ?u.615906
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
f s : ℕ → β
base : s 0 = 1
step : ∀ (n : ℕ), s (n + 1) = s n * f n
n : ℕ
⊢ ∏ k in range n, f k = s n

tactic: rw [Finset.prod_range_zero, base]
state_before: case zero
ι : Type ?u.615906
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
f s : ℕ → β
base : s 0 = 1
step : ∀ (n : ℕ), s (n + 1) = s n * f n
⊢ ∏ k in range Nat.zero, f k = s Nat.zero

tactic: simp only [hk, Finset.prod_range_succ, step, mul_comm]
state_before: case succ
ι : Type ?u.615906
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
f s : ℕ → β
base : s 0 = 1
step : ∀ (n : ℕ), s (n + 1) = s n * f n
k : ℕ
hk : ∏ k in range k, f k = s k
⊢ ∏ k in range (Nat.succ k), f k = s (Nat.succ k)
Theorem: Relation.TransGen.trans_induction_on
File: Mathlib/Logic/Relation.lean

tactic: induction h with
| single h => exact base h
| tail hab hbc h_ih => exact ih hab (single hbc) h_ih (base hbc)
state_before: α : Type u_1
β : Type ?u.20321
γ : Type ?u.20324
δ : Type ?u.20327
r : α → α → Prop
a✝ b✝ c d : α
P : {a b : α} → TransGen r a b → Prop
a b : α
h : TransGen r a b
base : ∀ {a b : α} (h : r a b), P (_ : TransGen r a b)
ih : ∀ {a b c : α} (h₁ : TransGen r a b) (h₂ : TransGen r b c), P h₁ → P h₂ → P (_ : TransGen r a c)
⊢ P h

tactic: exact base h
state_before: case single
α : Type u_1
β : Type ?u.20321
γ : Type ?u.20324
δ : Type ?u.20327
r : α → α → Prop
a✝ b✝¹ c d : α
P : {a b : α} → TransGen r a b → Prop
a b : α
base : ∀ {a b : α} (h : r a b), P (_ : TransGen r a b)
ih : ∀ {a b c : α} (h₁ : TransGen r a b) (h₂ : TransGen r b c), P h₁ → P h₂ → P (_ : TransGen r a c)
b✝ : α
h : r a b✝
⊢ P (_ : TransGen r a b✝)

tactic: exact ih hab (single hbc) h_ih (base hbc)
state_before: case tail
α : Type u_1
β : Type ?u.20321
γ : Type ?u.20324
δ : Type ?u.20327
r : α → α → Prop
a✝ b✝¹ c d : α
P : {a b : α} → TransGen r a b → Prop
a b : α
base : ∀ {a b : α} (h : r a b), P (_ : TransGen r a b)
ih : ∀ {a b c : α} (h₁ : TransGen r a b) (h₂ : TransGen r b c), P h₁ → P h₂ → P (_ : TransGen r a c)
b✝ c✝ : α
hab : TransGen r a b✝
hbc : r b✝ c✝
h_ih : P hab
⊢ P (_ : TransGen r a c✝)
Theorem: eq_singleton_bot_of_sSup_eq_bot_of_nonempty
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [Set.eq_singleton_iff_nonempty_unique_mem]
state_before: α : Type u_1
β : Type ?u.56847
β₂ : Type ?u.56850
γ : Type ?u.56853
ι : Sort ?u.56856
ι' : Sort ?u.56859
κ : ι → Sort ?u.56864
κ' : ι' → Sort ?u.56869
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : sSup s = ⊥
hne : Set.Nonempty s
⊢ s = {⊥}

tactic: rw [sSup_eq_bot] at h_sup
state_before: α : Type u_1
β : Type ?u.56847
β₂ : Type ?u.56850
γ : Type ?u.56853
ι : Sort ?u.56856
ι' : Sort ?u.56859
κ : ι → Sort ?u.56864
κ' : ι' → Sort ?u.56869
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : sSup s = ⊥
hne : Set.Nonempty s
⊢ Set.Nonempty s ∧ ∀ (x : α), x ∈ s → x = ⊥

tactic: exact ⟨hne, h_sup⟩
state_before: α : Type u_1
β : Type ?u.56847
β₂ : Type ?u.56850
γ : Type ?u.56853
ι : Sort ?u.56856
ι' : Sort ?u.56859
κ : ι → Sort ?u.56864
κ' : ι' → Sort ?u.56869
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : ∀ (a : α), a ∈ s → a = ⊥
hne : Set.Nonempty s
⊢ Set.Nonempty s ∧ ∀ (x : α), x ∈ s → x = ⊥
Theorem: Finset.exists_ne_map_eq_of_card_lt_of_maps_to
File: Mathlib/Data/Finset/Card.lean

tactic: classical
  by_contra' hz
  refine' hc.not_le (card_le_card_of_inj_on f hf _)
  intro x hx y hy
  contrapose
  exact hz x hx y hy
state_before: α : Type u_2
β : Type u_1
s t✝ : Finset α
f✝ : α → β
n : ℕ
t : Finset β
hc : card t < card s
f : α → β
hf : ∀ (a : α), a ∈ s → f a ∈ t
⊢ ∃ x, x ∈ s ∧ ∃ y, y ∈ s ∧ x ≠ y ∧ f x = f y

tactic: by_contra' hz
state_before: α : Type u_2
β : Type u_1
s t✝ : Finset α
f✝ : α → β
n : ℕ
t : Finset β
hc : card t < card s
f : α → β
hf : ∀ (a : α), a ∈ s → f a ∈ t
⊢ ∃ x, x ∈ s ∧ ∃ y, y ∈ s ∧ x ≠ y ∧ f x = f y

tactic: refine' hc.not_le (card_le_card_of_inj_on f hf _)
state_before: α : Type u_2
β : Type u_1
s t✝ : Finset α
f✝ : α → β
n : ℕ
t : Finset β
hc : card t < card s
f : α → β
hf : ∀ (a : α), a ∈ s → f a ∈ t
hz : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → f x ≠ f y
⊢ False

tactic: intro x hx y hy
state_before: α : Type u_2
β : Type u_1
s t✝ : Finset α
f✝ : α → β
n : ℕ
t : Finset β
hc : card t < card s
f : α → β
hf : ∀ (a : α), a ∈ s → f a ∈ t
hz : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → f x ≠ f y
⊢ ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → f a₁ = f a₂ → a₁ = a₂

tactic: contrapose
state_before: α : Type u_2
β : Type u_1
s t✝ : Finset α
f✝ : α → β
n : ℕ
t : Finset β
hc : card t < card s
f : α → β
hf : ∀ (a : α), a ∈ s → f a ∈ t
hz : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → f x ≠ f y
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ f x = f y → x = y

tactic: exact hz x hx y hy
state_before: α : Type u_2
β : Type u_1
s t✝ : Finset α
f✝ : α → β
n : ℕ
t : Finset β
hc : card t < card s
f : α → β
hf : ∀ (a : α), a ∈ s → f a ∈ t
hz : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → f x ≠ f y
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ ¬x = y → ¬f x = f y
Theorem: SimpleGraph.Walk.map_isCycle_iff_of_injective
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [isCycle_def, isCycle_def, map_isTrail_iff_of_injective hinj, Ne.def, map_eq_nil_iff,
  support_map, ← List.map_tail, List.nodup_map_iff hinj]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
f : G →g G'
f' : G' →g G''
u v u' v' : V
p✝ : Walk G u v
p : Walk G u u
hinj : Injective ↑f
⊢ IsCycle (Walk.map f p) ↔ IsCycle p
Theorem: UniqueFactorizationMonoid.factors_pos
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: constructor
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx : x ≠ 0
⊢ 0 < factors x ↔ ¬IsUnit x

tactic: intro h hx
state_before: case mp
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx : x ≠ 0
⊢ 0 < factors x → ¬IsUnit x

tactic: obtain ⟨p, hp⟩ := Multiset.exists_mem_of_ne_zero h.ne'
state_before: case mp
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx✝ : x ≠ 0
h : 0 < factors x
hx : IsUnit x
⊢ False

tactic: exact (prime_of_factor _ hp).not_unit (isUnit_of_dvd_unit (dvd_of_mem_factors hp) hx)
state_before: case mp.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx✝ : x ≠ 0
h : 0 < factors x
hx : IsUnit x
p : α
hp : p ∈ factors x
⊢ False

tactic: intro h
state_before: case mpr
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx : x ≠ 0
⊢ ¬IsUnit x → 0 < factors x

tactic: obtain ⟨p, hp⟩ := exists_mem_factors hx h
state_before: case mpr
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx : x ≠ 0
h : ¬IsUnit x
⊢ 0 < factors x

tactic: exact
  bot_lt_iff_ne_bot.mpr
    (mt Multiset.eq_zero_iff_forall_not_mem.mp (not_forall.mpr ⟨p, not_not.mpr hp⟩))
state_before: case mpr.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x : α
hx : x ≠ 0
h : ¬IsUnit x
p : α
hp : p ∈ factors x
⊢ 0 < factors x
Theorem: uniformity_eq_uniformity_interior
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: let ⟨s, hs, hs_comp⟩ := comp3_mem_uniformity hd
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.89348
inst✝ : UniformSpace α
d : Set (α × α)
hd : d ∈ 𝓤 α
⊢ 𝓤 α ≤ (𝓟 ∘ interior) d

tactic: let ⟨t, ht, hst, ht_comp⟩ := nhdset_of_mem_uniformity s hs
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.89348
inst✝ : UniformSpace α
d : Set (α × α)
hd : d ∈ 𝓤 α
s : Set (α × α)
hs : s ∈ 𝓤 α
hs_comp : s ○ (s ○ s) ⊆ d
⊢ 𝓤 α ≤ (𝓟 ∘ interior) d

tactic: have : s ⊆ interior d :=
  calc
    s ⊆ t := hst
    _ ⊆ interior d :=
      ht.subset_interior_iff.mpr fun x (hx : x ∈ t) =>
        let ⟨x, y, h₁, h₂, h₃⟩ := ht_comp hx
        hs_comp ⟨x, h₁, y, h₂, h₃⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.89348
inst✝ : UniformSpace α
d : Set (α × α)
hd : d ∈ 𝓤 α
s : Set (α × α)
hs : s ∈ 𝓤 α
hs_comp : s ○ (s ○ s) ⊆ d
t : Set (α × α)
ht : IsOpen t
hst : s ⊆ t
ht_comp : t ⊆ {p | ∃ x y, (p.fst, x) ∈ s ∧ (x, y) ∈ s ∧ (y, p.snd) ∈ s}
⊢ 𝓤 α ≤ (𝓟 ∘ interior) d

tactic: have : interior d ∈ 𝓤 α := by filter_upwards [hs]using this
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.89348
inst✝ : UniformSpace α
d : Set (α × α)
hd : d ∈ 𝓤 α
s : Set (α × α)
hs : s ∈ 𝓤 α
hs_comp : s ○ (s ○ s) ⊆ d
t : Set (α × α)
ht : IsOpen t
hst : s ⊆ t
ht_comp : t ⊆ {p | ∃ x y, (p.fst, x) ∈ s ∧ (x, y) ∈ s ∧ (y, p.snd) ∈ s}
this : s ⊆ interior d
⊢ 𝓤 α ≤ (𝓟 ∘ interior) d

tactic: simp [this]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.89348
inst✝ : UniformSpace α
d : Set (α × α)
hd : d ∈ 𝓤 α
s : Set (α × α)
hs : s ∈ 𝓤 α
hs_comp : s ○ (s ○ s) ⊆ d
t : Set (α × α)
ht : IsOpen t
hst : s ⊆ t
ht_comp : t ⊆ {p | ∃ x y, (p.fst, x) ∈ s ∧ (x, y) ∈ s ∧ (y, p.snd) ∈ s}
this✝ : s ⊆ interior d
this : interior d ∈ 𝓤 α
⊢ 𝓤 α ≤ (𝓟 ∘ interior) d

tactic: filter_upwards [hs]using this
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.89348
inst✝ : UniformSpace α
d : Set (α × α)
hd : d ∈ 𝓤 α
s : Set (α × α)
hs : s ∈ 𝓤 α
hs_comp : s ○ (s ○ s) ⊆ d
t : Set (α × α)
ht : IsOpen t
hst : s ⊆ t
ht_comp : t ⊆ {p | ∃ x y, (p.fst, x) ∈ s ∧ (x, y) ∈ s ∧ (y, p.snd) ∈ s}
this : s ⊆ interior d
⊢ interior d ∈ 𝓤 α
Theorem: LieSubalgebra.lieSpan_le
File: Mathlib/Algebra/Lie/Subalgebra.lean

tactic: constructor
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K✝ K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
s : Set L
K : LieSubalgebra R L
⊢ lieSpan R L s ≤ K ↔ s ⊆ ↑K

tactic: exact Set.Subset.trans subset_lieSpan
state_before: case mp
R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K✝ K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
s : Set L
K : LieSubalgebra R L
⊢ lieSpan R L s ≤ K → s ⊆ ↑K

tactic: intro hs m hm
state_before: case mpr
R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K✝ K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
s : Set L
K : LieSubalgebra R L
⊢ s ⊆ ↑K → lieSpan R L s ≤ K

tactic: rw [mem_lieSpan] at hm
state_before: case mpr
R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K✝ K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
s : Set L
K : LieSubalgebra R L
hs : s ⊆ ↑K
m : L
hm : m ∈ lieSpan R L s
⊢ m ∈ K

tactic: exact hm _ hs
state_before: case mpr
R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K✝ K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
s : Set L
K : LieSubalgebra R L
hs : s ⊆ ↑K
m : L
hm : ∀ (K : LieSubalgebra R L), s ⊆ ↑K → m ∈ K
⊢ m ∈ K
Theorem: Bool.not_beq_to_not_eq
File: src/lean/Init/SimpLemmas.lean

tactic: cases a <;> cases b <;> decide
state_before: a b : Bool
⊢ ((!a == b) = true) = ¬a = b