tasksource/leandojo huggingface dataset:
Theorem: Stream'.take_take
File: Mathlib/Data/Stream/Init.lean

tactic: rw [min_zero, List.take_zero, take_zero]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
n : ℕ
⊢ List.take 0 (take n s) = take (min n 0) s

tactic: rw [zero_min, take_zero, List.take_nil]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
m : ℕ
⊢ List.take m (take 0 s) = take (min 0 m) s

tactic: rw [take_succ, List.take_cons, Nat.min_succ_succ, take_succ, take_take]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
m n : ℕ
⊢ List.take (m + 1) (take (n + 1) s) = take (min (n + 1) (m + 1)) s
Theorem: ContinuousMap.nullhomotopic_of_constant
File: Mathlib/Topology/Homotopy/Contractible.lean

tactic: rfl
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.173
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
y : Y
⊢ Homotopic (const X y) (const X y)
Theorem: sup_left_comm
File: Mathlib/Order/Lattice.lean

tactic: rw [← sup_assoc, ← sup_assoc, @sup_comm α _ a]
state_before: α : Type u
β : Type v
inst✝ : SemilatticeSup α
a✝ b✝ c✝ d a b c : α
⊢ a ⊔ (b ⊔ c) = b ⊔ (a ⊔ c)
Theorem: biSup_sup
File: Mathlib/Order/CompleteLattice.lean

tactic: haveI : Nonempty { i // p i } :=
    let ⟨i, hi⟩ := h
    ⟨⟨i, hi⟩⟩
state_before: α : Type u_2
β : Type ?u.102985
β₂ : Type ?u.102988
γ : Type ?u.102991
ι : Sort u_1
ι' : Sort ?u.102997
κ : ι → Sort ?u.103002
κ' : ι' → Sort ?u.103007
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a✝ b : α
p : ι → Prop
f : (i : ι) → p i → α
a : α
h : ∃ i, p i
⊢ (⨆ (i : ι) (h : p i), f i h) ⊔ a = ⨆ (i : ι) (h : p i), f i h ⊔ a

tactic: rw [iSup_subtype', iSup_subtype', iSup_sup]
state_before: α : Type u_2
β : Type ?u.102985
β₂ : Type ?u.102988
γ : Type ?u.102991
ι : Sort u_1
ι' : Sort ?u.102997
κ : ι → Sort ?u.103002
κ' : ι' → Sort ?u.103007
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a✝ b : α
p : ι → Prop
f : (i : ι) → p i → α
a : α
h : ∃ i, p i
this : Nonempty { i // p i }
⊢ (⨆ (i : ι) (h : p i), f i h) ⊔ a = ⨆ (i : ι) (h : p i), f i h ⊔ a
Theorem: Complex.cos_sub_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: simp [sub_eq_add_neg, cos_add]
state_before: x : ℂ
⊢ cos (x - ↑π / 2) = sin x
Theorem: compact_open_separated_mul_left
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: rcases compact_open_separated_mul_right (hK.image continuous_op) (opHomeomorph.isOpenMap U hU)
    (image_subset op hKU) with
  ⟨V, hV : V ∈ 𝓝 (op (1 : G)), hV' : op '' K * V ⊆ op '' U⟩
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
K U : Set G
hK : IsCompact K
hU : IsOpen U
hKU : K ⊆ U
⊢ ∃ V, V ∈ 𝓝 1 ∧ V * K ⊆ U

tactic: refine' ⟨op ⁻¹' V, continuous_op.continuousAt hV, _⟩
state_before: case intro.intro
α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
K U : Set G
hK : IsCompact K
hU : IsOpen U
hKU : K ⊆ U
V : Set Gᵐᵒᵖ
hV : V ∈ 𝓝 (op 1)
hV' : op '' K * V ⊆ op '' U
⊢ ∃ V, V ∈ 𝓝 1 ∧ V * K ⊆ U

tactic: rwa [← image_preimage_eq V op_surjective, ← image_op_mul, image_subset_iff,
  preimage_image_eq _ op_injective] at hV'
state_before: case intro.intro
α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
K U : Set G
hK : IsCompact K
hU : IsOpen U
hKU : K ⊆ U
V : Set Gᵐᵒᵖ
hV : V ∈ 𝓝 (op 1)
hV' : op '' K * V ⊆ op '' U
⊢ op ⁻¹' V * K ⊆ U
Theorem: List.card_union_disjoint
File: Mathlib/Data/List/Card.lean

tactic: rw [card_eq_of_equiv (union_equiv_append as bs), card_append_disjoint h]
state_before: α : Type u_1
β : Sort ?u.54436
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
as bs : List α
h : Disjoint as bs
⊢ card (List.union as bs) = card as + card bs
Theorem: Matrix.blockDiagonal_add
File: Mathlib/Data/Matrix/Block.lean

tactic: ext
state_before: l : Type ?u.140829
m : Type u_2
n : Type u_3
o : Type u_4
p : Type ?u.140841
q : Type ?u.140844
m' : o → Type ?u.140849
n' : o → Type ?u.140854
p' : o → Type ?u.140859
R : Type ?u.140862
S : Type ?u.140865
α : Type u_1
β : Type ?u.140871
inst✝¹ : DecidableEq o
inst✝ : AddZeroClass α
M N : o → Matrix m n α
⊢ blockDiagonal (M + N) = blockDiagonal M + blockDiagonal N

tactic: simp only [blockDiagonal_apply, Pi.add_apply, add_apply]
state_before: case a.h
l : Type ?u.140829
m : Type u_2
n : Type u_3
o : Type u_4
p : Type ?u.140841
q : Type ?u.140844
m' : o → Type ?u.140849
n' : o → Type ?u.140854
p' : o → Type ?u.140859
R : Type ?u.140862
S : Type ?u.140865
α : Type u_1
β : Type ?u.140871
inst✝¹ : DecidableEq o
inst✝ : AddZeroClass α
M N : o → Matrix m n α
i✝ : m × o
x✝ : n × o
⊢ blockDiagonal (M + N) i✝ x✝ = (blockDiagonal M + blockDiagonal N) i✝ x✝

tactic: split_ifs <;> simp
state_before: case a.h
l : Type ?u.140829
m : Type u_2
n : Type u_3
o : Type u_4
p : Type ?u.140841
q : Type ?u.140844
m' : o → Type ?u.140849
n' : o → Type ?u.140854
p' : o → Type ?u.140859
R : Type ?u.140862
S : Type ?u.140865
α : Type u_1
β : Type ?u.140871
inst✝¹ : DecidableEq o
inst✝ : AddZeroClass α
M N : o → Matrix m n α
i✝ : m × o
x✝ : n × o
⊢ (if i✝.snd = x✝.snd then M i✝.snd i✝.fst x✝.fst + N i✝.snd i✝.fst x✝.fst else 0) =
    (if i✝.snd = x✝.snd then M i✝.snd i✝.fst x✝.fst else 0) + if i✝.snd = x✝.snd then N i✝.snd i✝.fst x✝.fst else 0
Theorem: Set.exists_intermediate_Set'
File: Mathlib/Data/Set/Ncard.lean

tactic: obtain ⟨r, hsr, hrt, hc⟩ :=
  exists_intermediate_Set (m - s.ncard) (by rwa [tsub_add_cancel_of_le hs]) h
state_before: α : Type u_1
β : Type ?u.132165
s t : Set α
a b x y : α
f : α → β
m : ℕ
hs : ncard s ≤ m
ht : m ≤ ncard t
h : s ⊆ t
⊢ ∃ r, s ⊆ r ∧ r ⊆ t ∧ ncard r = m

tactic: rw [tsub_add_cancel_of_le hs] at hc
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.132165
s t : Set α
a b x y : α
f : α → β
m : ℕ
hs : ncard s ≤ m
ht : m ≤ ncard t
h : s ⊆ t
r : Set α
hsr : s ⊆ r
hrt : r ⊆ t
hc : ncard r = m - ncard s + ncard s
⊢ ∃ r, s ⊆ r ∧ r ⊆ t ∧ ncard r = m

tactic: exact ⟨r, hsr, hrt, hc⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.132165
s t : Set α
a b x y : α
f : α → β
m : ℕ
hs : ncard s ≤ m
ht : m ≤ ncard t
h : s ⊆ t
r : Set α
hsr : s ⊆ r
hrt : r ⊆ t
hc : ncard r = m
⊢ ∃ r, s ⊆ r ∧ r ⊆ t ∧ ncard r = m

tactic: rwa [tsub_add_cancel_of_le hs]
state_before: α : Type u_1
β : Type ?u.132165
s t : Set α
a b x y : α
f : α → β
m : ℕ
hs : ncard s ≤ m
ht : m ≤ ncard t
h : s ⊆ t
⊢ m - ncard s + ncard s ≤ ncard t
Theorem: Tactic.NormNum.int_lcm_helper
File: Mathlib/Tactic/NormNum/GCD.lean

tactic: subst_vars
state_before: x y : ℤ
x' y' d : ℕ
hx : Int.natAbs x = x'
hy : Int.natAbs y = y'
h : Nat.lcm x' y' = d
⊢ Int.lcm x y = d

tactic: rw [Int.lcm_def]
state_before: x y : ℤ
⊢ Int.lcm x y = Nat.lcm (Int.natAbs x) (Int.natAbs y)
Theorem: AddCircle.le_add_order_smul_norm_of_isOfFinAddOrder
File: Mathlib/Analysis/Normed/Group/AddCircle.lean

tactic: obtain ⟨n, hn⟩ := exists_norm_eq_of_isOfFinAddOrder hu
state_before: p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
hu' : u ≠ 0
⊢ p ≤ addOrderOf u • ‖u‖

tactic: replace hu : (addOrderOf u : ℝ) ≠ 0
state_before: case intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
hu' : u ≠ 0
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
⊢ p ≤ addOrderOf u • ‖u‖

tactic: conv_lhs => rw [← mul_one p]
state_before: case intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu' : u ≠ 0
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
hu : ↑(addOrderOf u) ≠ 0
⊢ p ≤ addOrderOf u • ‖u‖

tactic: rw [hn, nsmul_eq_mul, ← mul_assoc, mul_comm _ p, mul_assoc, mul_div_cancel' _ hu,
  mul_le_mul_left hp.out, Nat.one_le_cast, Nat.one_le_iff_ne_zero]
state_before: case intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu' : u ≠ 0
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
hu : ↑(addOrderOf u) ≠ 0
⊢ p * 1 ≤ addOrderOf u • ‖u‖

tactic: contrapose! hu'
state_before: case intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu' : u ≠ 0
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
hu : ↑(addOrderOf u) ≠ 0
⊢ n ≠ 0

tactic: simpa only [hu', Nat.cast_zero, zero_div, MulZeroClass.mul_zero, norm_eq_zero] using hn
state_before: case intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
hu : ↑(addOrderOf u) ≠ 0
hu' : n = 0
⊢ u = 0

tactic: norm_cast
state_before: case hu
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
hu' : u ≠ 0
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
⊢ ↑(addOrderOf u) ≠ 0

tactic: exact (addOrderOf_pos_iff.mpr hu).ne'
state_before: case hu
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
hu' : u ≠ 0
n : ℕ
hn : ‖u‖ = p * (↑n / ↑(addOrderOf u))
⊢ ¬addOrderOf u = 0
Theorem: Finsupp.support_curry
File: Mathlib/Data/Finsupp/Basic.lean

tactic: rw [← Finset.biUnion_singleton]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.552201
ι : Type ?u.552204
M : Type u_3
M' : Type ?u.552210
N : Type ?u.552213
P : Type ?u.552216
G : Type ?u.552219
H : Type ?u.552222
R : Type ?u.552225
S : Type ?u.552228
inst✝² : AddCommMonoid M
inst✝¹ : AddCommMonoid N
inst✝ : DecidableEq α
f : α × β →₀ M
⊢ (Finsupp.curry f).support ⊆ image Prod.fst f.support

tactic: refine' Finset.Subset.trans support_sum _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.552201
ι : Type ?u.552204
M : Type u_3
M' : Type ?u.552210
N : Type ?u.552213
P : Type ?u.552216
G : Type ?u.552219
H : Type ?u.552222
R : Type ?u.552225
S : Type ?u.552228
inst✝² : AddCommMonoid M
inst✝¹ : AddCommMonoid N
inst✝ : DecidableEq α
f : α × β →₀ M
⊢ (Finsupp.curry f).support ⊆ Finset.biUnion f.support fun a => {a.fst}

tactic: refine' Finset.biUnion_mono fun a _ => support_single_subset
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.552201
ι : Type ?u.552204
M : Type u_3
M' : Type ?u.552210
N : Type ?u.552213
P : Type ?u.552216
G : Type ?u.552219
H : Type ?u.552222
R : Type ?u.552225
S : Type ?u.552228
inst✝² : AddCommMonoid M
inst✝¹ : AddCommMonoid N
inst✝ : DecidableEq α
f : α × β →₀ M
⊢ (Finset.biUnion f.support fun a => (single a.fst (single a.snd (↑f a))).support) ⊆
    Finset.biUnion f.support fun a => {a.fst}
Theorem: SimpleGraph.Walk.length_edges
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [edges]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ List.length (edges p) = length p
Theorem: IsCauSeq.cauchy₂
File: Mathlib/Data/Real/CauSeq.lean

tactic: refine' (hf _ (half_pos ε0)).imp fun i hi j ij k ik => _
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : ℕ → β
hf : IsCauSeq abv f
ε : α
ε0 : 0 < ε
⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ i → abv (f j - f k) < ε

tactic: rw [← add_halves ε]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : ℕ → β
hf : IsCauSeq abv f
ε : α
ε0 : 0 < ε
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → abv (f j - f i) < ε / 2
j : ℕ
ij : j ≥ i
k : ℕ
ik : k ≥ i
⊢ abv (f j - f k) < ε

tactic: refine' lt_of_le_of_lt (abv_sub_le abv _ _ _) (add_lt_add (hi _ ij) _)
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : ℕ → β
hf : IsCauSeq abv f
ε : α
ε0 : 0 < ε
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → abv (f j - f i) < ε / 2
j : ℕ
ij : j ≥ i
k : ℕ
ik : k ≥ i
⊢ abv (f j - f k) < ε / 2 + ε / 2

tactic: rw [abv_sub abv]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : ℕ → β
hf : IsCauSeq abv f
ε : α
ε0 : 0 < ε
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → abv (f j - f i) < ε / 2
j : ℕ
ij : j ≥ i
k : ℕ
ik : k ≥ i
⊢ abv (f i - f k) < ε / 2

tactic: exact hi _ ik
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : ℕ → β
hf : IsCauSeq abv f
ε : α
ε0 : 0 < ε
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → abv (f j - f i) < ε / 2
j : ℕ
ij : j ≥ i
k : ℕ
ik : k ≥ i
⊢ abv (f k - f i) < ε / 2
Theorem: Complex.isCauSeq_im
File: Mathlib/Data/Complex/Basic.lean

tactic: simpa using abs_im_le_abs (f j - f i)
state_before: f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ↑abs (↑f j - ↑f i) < ε
j : ℕ
ij : j ≥ i
⊢ abs' ((fun n => (↑f n).im) j - (fun n => (↑f n).im) i) ≤ ↑abs (↑f j - ↑f i)
Theorem: List.Ico.filter_lt_of_top_le
File: Mathlib/Data/List/Intervals.lean

tactic: simp only [(lt_of_lt_of_le (mem.1 hk).2 hml), decide_True]
state_before: n m l : ℕ
hml : m ≤ l
k : ℕ
hk : k ∈ Ico n m
⊢ decide (k < l) = true
Theorem: Fintype.prod_extend_by_one
File: Mathlib/Data/Fintype/BigOperators.lean

tactic: rw [← prod_filter, filter_mem_eq_inter, univ_inter]
state_before: α : Type u_1
β : Type ?u.1844
γ : Type ?u.1847
ι : Type u_2
inst✝² : DecidableEq ι
inst✝¹ : Fintype ι
inst✝ : CommMonoid α
s : Finset ι
f : ι → α
⊢ (∏ i : ι, if i ∈ s then f i else 1) = ∏ i in s, f i
Theorem: UpperSet.compl_sSup
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp only [coe_compl, coe_sSup, compl_iInter₂, LowerSet.coe_iSup₂]
state_before: α : Type u_1
β : Type ?u.82316
γ : Type ?u.82319
ι : Sort ?u.82322
κ : ι → Sort ?u.82327
inst✝ : LE α
s t : UpperSet α
a : α
S : Set (UpperSet α)
⊢ ↑(compl (sSup S)) = ↑(⨆ (s : UpperSet α) (_ : s ∈ S), compl s)
Theorem: CategoryTheory.Preadditive.mono_of_kernel_zero
File: Mathlib/CategoryTheory/Preadditive/Basic.lean

tactic: rw [← kernel.lift_ι f g h, w, Limits.comp_zero]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
P Q R : C
f✝ f' : P ⟶ Q
g✝ g' : Q ⟶ R
X Y : C
f : X ⟶ Y
inst✝ : HasLimit (parallelPair f 0)
w : kernel.ι f = 0
P✝ : C
g : P✝ ⟶ X
h : g ≫ f = 0
⊢ g = 0
Theorem: isClosed_setOf_clusterPt
File: Mathlib/Topology/Basic.lean

tactic: simp only [ClusterPt, inf_neBot_iff_frequently_left, setOf_forall, imp_iff_not_or]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
⊢ IsClosed {x | ClusterPt x f}

tactic: refine' isClosed_iInter fun p => IsClosed.union _ _ <;> apply isClosed_compl_iff.2
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
⊢ IsClosed (⋂ (i : α → Prop), {x | (¬∀ᶠ (x : α) in 𝓝 x, i x) ∨ ∃ᶠ (x : α) in f, i x})

tactic: exacts [isOpen_setOf_eventually_nhds, isOpen_const]
state_before: case refine'_1
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
p : α → Prop
⊢ IsOpen fun x => sets (𝓝 x) {x | (fun x => p x) x}

case refine'_2
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
p : α → Prop
⊢ IsOpen fun x => sets f {x | (fun x => ¬(fun x => p x) x) x}
Theorem: Real.toNNReal_pos
File: Mathlib/Data/Real/NNReal.lean

tactic: simp [← NNReal.coe_lt_coe, lt_irrefl]
state_before: r : ℝ
⊢ 0 < toNNReal r ↔ 0 < r
Theorem: closedBall_prod_same
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp [Prod.dist_eq]
state_before: α : Type u
β : Type v
X : Type ?u.262111
ι : Type ?u.262114
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
x : α
y : β
r : ℝ
z : α × β
⊢ z ∈ closedBall x r ×ˢ closedBall y r ↔ z ∈ closedBall (x, y) r
Theorem: Order.Ideal.inter_nonempty
File: Mathlib/Order/Ideal.lean

tactic: obtain ⟨a, ha⟩ := I.nonempty
state_before: P : Type u_1
inst✝¹ : LE P
I✝ J✝ s t : Ideal P
x y : P
inst✝ : IsDirected P fun x x_1 => x ≥ x_1
I J : Ideal P
⊢ Set.Nonempty (↑I ∩ ↑J)

tactic: obtain ⟨b, hb⟩ := J.nonempty
state_before: case intro
P : Type u_1
inst✝¹ : LE P
I✝ J✝ s t : Ideal P
x y : P
inst✝ : IsDirected P fun x x_1 => x ≥ x_1
I J : Ideal P
a : P
ha : a ∈ ↑I
⊢ Set.Nonempty (↑I ∩ ↑J)

tactic: obtain ⟨c, hac, hbc⟩ := exists_le_le a b
state_before: case intro.intro
P : Type u_1
inst✝¹ : LE P
I✝ J✝ s t : Ideal P
x y : P
inst✝ : IsDirected P fun x x_1 => x ≥ x_1
I J : Ideal P
a : P
ha : a ∈ ↑I
b : P
hb : b ∈ ↑J
⊢ Set.Nonempty (↑I ∩ ↑J)

tactic: exact ⟨c, I.lower hac ha, J.lower hbc hb⟩
state_before: case intro.intro.intro.intro
P : Type u_1
inst✝¹ : LE P
I✝ J✝ s t : Ideal P
x y : P
inst✝ : IsDirected P fun x x_1 => x ≥ x_1
I J : Ideal P
a : P
ha : a ∈ ↑I
b : P
hb : b ∈ ↑J
c : P
hac : c ≤ a
hbc : c ≤ b
⊢ Set.Nonempty (↑I ∩ ↑J)
Theorem: ENNReal.ofReal_lt_iff_lt_toReal
File: Mathlib/Data/Real/ENNReal.lean

tactic: lift b to ℝ≥0 using hb
state_before: α : Type ?u.810494
β : Type ?u.810497
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
b : ℝ≥0∞
ha : 0 ≤ a
hb : b ≠ ⊤
⊢ ENNReal.ofReal a < b ↔ a < ENNReal.toReal b

tactic: simpa [ENNReal.ofReal, ENNReal.toReal] using Real.toNNReal_lt_iff_lt_coe ha
state_before: case intro
α : Type ?u.810494
β : Type ?u.810497
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
ha : 0 ≤ a
b : ℝ≥0
⊢ ENNReal.ofReal a < ↑b ↔ a < ENNReal.toReal ↑b
Theorem: Polynomial.coeff_coe_units_zero_ne_zero
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: conv in 0 => rw [← natDegree_coe_units u]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
u : R[X]ˣ
⊢ coeff (↑u) 0 ≠ 0

tactic: rw [← leadingCoeff, Ne.def, leadingCoeff_eq_zero]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
u : R[X]ˣ
⊢ coeff (↑u) (natDegree ↑u) ≠ 0

tactic: exact Units.ne_zero _
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
u : R[X]ˣ
⊢ ¬↑u = 0
Theorem: FintypeCat.Skeleton.is_skeletal
File: Mathlib/CategoryTheory/FintypeCat.lean

tactic: intro a
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
⊢ Function.LeftInverse (fun x => (h.inv { down := x }).down) fun x => (h.hom { down := x }).down

tactic: change ULift.down _ = _
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len X)
⊢ (fun x => (h.inv { down := x }).down) ((fun x => (h.hom { down := x }).down) a) = a

tactic: rw [ULift.up_down]
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len X)
⊢ (h.inv { down := (fun x => (h.hom { down := x }).down) a }).down = a

tactic: change ((h.hom ≫ h.inv) _).down = _
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len X)
⊢ (h.inv (h.hom { down := a })).down = a

tactic: simp
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len X)
⊢ ((h.hom ≫ h.inv) { down := a }).down = a

tactic: rfl
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len X)
⊢ (𝟙 X { down := a }).down = a

tactic: intro a
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
⊢ Function.RightInverse (fun x => (h.inv { down := x }).down) fun x => (h.hom { down := x }).down

tactic: change ULift.down _ = _
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len Y)
⊢ (fun x => (h.hom { down := x }).down) ((fun x => (h.inv { down := x }).down) a) = a

tactic: rw [ULift.up_down]
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len Y)
⊢ (h.hom { down := (fun x => (h.inv { down := x }).down) a }).down = a

tactic: change ((h.inv ≫ h.hom) _).down = _
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len Y)
⊢ (h.hom (h.inv { down := a })).down = a

tactic: simp
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len Y)
⊢ ((h.inv ≫ h.hom) { down := a }).down = a

tactic: rfl
state_before: X Y : Skeleton
x✝ : IsIsomorphic X Y
h : X ≅ Y
a : Fin (len Y)
⊢ (𝟙 Y { down := a }).down = a
Theorem: List.card_subset_le
File: Mathlib/Data/List/Card.lean

tactic: simp
state_before: α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
bs : List α
x✝ : [] ⊆ bs
⊢ card [] ≤ card bs

tactic: cases Decidable.em (a ∈ as) with
| inl h' =>
  have hsub' : as ⊆ bs := fun _ xmem ↦ hsub (mem_cons_of_mem a xmem)
  simp [h', card_subset_le hsub']
| inr h' =>
  have : a ∈ bs := hsub (Mem.head ..)
  rw [card_cons_of_not_mem h', card_remove_of_mem this]
  apply Nat.add_le_add_right
  apply card_subset_le
  intro x xmem
  rw [mem_remove_iff]
  exact ⟨hsub (mem_cons_of_mem _ xmem), fun h ↦ h' (h ▸ xmem)⟩
state_before: α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
⊢ card (a :: as) ≤ card bs

tactic: have hsub' : as ⊆ bs := fun _ xmem ↦ hsub (mem_cons_of_mem a xmem)
state_before: case inl
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : a ∈ as
⊢ card (a :: as) ≤ card bs

tactic: simp [h', card_subset_le hsub']
state_before: case inl
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : a ∈ as
hsub' : as ⊆ bs
⊢ card (a :: as) ≤ card bs

tactic: have : a ∈ bs := hsub (Mem.head ..)
state_before: case inr
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
⊢ card (a :: as) ≤ card bs

tactic: rw [card_cons_of_not_mem h', card_remove_of_mem this]
state_before: case inr
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
this : a ∈ bs
⊢ card (a :: as) ≤ card bs

tactic: apply Nat.add_le_add_right
state_before: case inr
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
this : a ∈ bs
⊢ card as + 1 ≤ card (remove a bs) + 1

tactic: apply card_subset_le
state_before: case inr.h
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
this : a ∈ bs
⊢ card as ≤ card (remove a bs)

tactic: intro x xmem
state_before: case inr.h.a
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
this : a ∈ bs
⊢ as ⊆ remove a bs

tactic: rw [mem_remove_iff]
state_before: case inr.h.a
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
this : a ∈ bs
x : α
xmem : x ∈ as
⊢ x ∈ remove a bs

tactic: exact ⟨hsub (mem_cons_of_mem _ xmem), fun h ↦ h' (h ▸ xmem)⟩
state_before: case inr.h.a
α : Type u_1
β : Sort ?u.43987
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
hsub : a :: as ⊆ bs
h' : ¬a ∈ as
this : a ∈ bs
x : α
xmem : x ∈ as
⊢ x ∈ bs ∧ x ≠ a
Theorem: PowerBasis.equivAdjoinSimple_symm_aeval
File: Mathlib/FieldTheory/Adjoin.lean

tactic: rw [equivAdjoinSimple, equivOfMinpoly_symm, equivOfMinpoly_aeval, adjoin.powerBasis_gen]
state_before: K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
pb : PowerBasis K L
f : K[X]
⊢ ↑(AlgEquiv.symm (equivAdjoinSimple pb)) (↑(aeval pb.gen) f) = ↑(aeval (AdjoinSimple.gen K pb.gen)) f
Theorem: HasFDerivAt.cpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean

tactic: convert (@Complex.hasFDerivAt_cpow ((fun x => (f x, g x)) x) h0).comp x (hf.prod hg)
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
f' g' : E →L[ℂ] ℂ
x : E
s : Set E
c : ℂ
hf : HasFDerivAt f f' x
hg : HasFDerivAt g g' x
h0 : 0 < (f x).re ∨ (f x).im ≠ 0
⊢ HasFDerivAt (fun x => f x ^ g x) ((g x * f x ^ (g x - 1)) • f' + (f x ^ g x * Complex.log (f x)) • g') x