tasksource/leandojo huggingface dataset:
Theorem: IsCompact.compl_mem_sets_of_nhdsWithin
File: Mathlib/Topology/SubsetProperties.lean

tactic: refine' hs.compl_mem_sets fun a ha => _
state_before: α : Type u
β : Type v
ι : Type ?u.1080
π : ι → Type ?u.1085
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
hs : IsCompact s
f : Filter α
hf : ∀ (a : α), a ∈ s → ∃ t, t ∈ 𝓝[s] a ∧ tᶜ ∈ f
⊢ sᶜ ∈ f

tactic: rcases hf a ha with ⟨t, ht, hst⟩
state_before: α : Type u
β : Type v
ι : Type ?u.1080
π : ι → Type ?u.1085
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
hs : IsCompact s
f : Filter α
hf : ∀ (a : α), a ∈ s → ∃ t, t ∈ 𝓝[s] a ∧ tᶜ ∈ f
a : α
ha : a ∈ s
⊢ sᶜ ∈ 𝓝 a ⊓ f

tactic: replace ht := mem_inf_principal.1 ht
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.1080
π : ι → Type ?u.1085
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t✝ : Set α
hs : IsCompact s
f : Filter α
hf : ∀ (a : α), a ∈ s → ∃ t, t ∈ 𝓝[s] a ∧ tᶜ ∈ f
a : α
ha : a ∈ s
t : Set α
ht : t ∈ 𝓝[s] a
hst : tᶜ ∈ f
⊢ sᶜ ∈ 𝓝 a ⊓ f

tactic: apply mem_inf_of_inter ht hst
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.1080
π : ι → Type ?u.1085
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t✝ : Set α
hs : IsCompact s
f : Filter α
hf : ∀ (a : α), a ∈ s → ∃ t, t ∈ 𝓝[s] a ∧ tᶜ ∈ f
a : α
ha : a ∈ s
t : Set α
hst : tᶜ ∈ f
ht : {x | x ∈ s → x ∈ t} ∈ 𝓝 a
⊢ sᶜ ∈ 𝓝 a ⊓ f

tactic: rintro x ⟨h₁, h₂⟩ hs
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.1080
π : ι → Type ?u.1085
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t✝ : Set α
hs : IsCompact s
f : Filter α
hf : ∀ (a : α), a ∈ s → ∃ t, t ∈ 𝓝[s] a ∧ tᶜ ∈ f
a : α
ha : a ∈ s
t : Set α
hst : tᶜ ∈ f
ht : {x | x ∈ s → x ∈ t} ∈ 𝓝 a
⊢ {x | x ∈ s → x ∈ t} ∩ tᶜ ⊆ sᶜ

tactic: exact h₂ (h₁ hs)
state_before: case intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.1080
π : ι → Type ?u.1085
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t✝ : Set α
hs✝ : IsCompact s
f : Filter α
hf : ∀ (a : α), a ∈ s → ∃ t, t ∈ 𝓝[s] a ∧ tᶜ ∈ f
a : α
ha : a ∈ s
t : Set α
hst : tᶜ ∈ f
ht : {x | x ∈ s → x ∈ t} ∈ 𝓝 a
x : α
h₁ : x ∈ {x | x ∈ s → x ∈ t}
h₂ : x ∈ tᶜ
hs : x ∈ s
⊢ False
Theorem: Matrix.std_basis_eq_basis_mul_basis
File: Mathlib/Data/Matrix/Basis.lean

tactic: ext i' j'
state_before: l : Type ?u.14423
m : Type u_1
n : Type u_2
R : Type ?u.14432
α : Type ?u.14435
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i : m
j : n
⊢ stdBasisMatrix i j 1 = vecMulVec (fun i' => if i = i' then 1 else 0) fun j' => if j = j' then 1 else 0

tactic: simp only [stdBasisMatrix, vecMulVec, mul_ite, mul_one, mul_zero, of_apply]
state_before: case a.h
l : Type ?u.14423
m : Type u_1
n : Type u_2
R : Type ?u.14432
α : Type ?u.14435
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i : m
j : n
i' : m
j' : n
⊢ stdBasisMatrix i j 1 i' j' = vecMulVec (fun i' => if i = i' then 1 else 0) (fun j' => if j = j' then 1 else 0) i' j'

tactic: simp_rw [@and_comm (i = i')]
state_before: case a.h
l : Type ?u.14423
m : Type u_1
n : Type u_2
R : Type ?u.14432
α : Type ?u.14435
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i : m
j : n
i' : m
j' : n
⊢ (if i = i' ∧ j = j' then 1 else 0) = if j = j' then if i = i' then 1 else 0 else 0

tactic: exact ite_and _ _ _ _
state_before: case a.h
l : Type ?u.14423
m : Type u_1
n : Type u_2
R : Type ?u.14432
α : Type ?u.14435
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i : m
j : n
i' : m
j' : n
⊢ (if j = j' ∧ i = i' then 1 else 0) = if j = j' then if i = i' then 1 else 0 else 0
Theorem: Ordinal.add_eq_right_iff_mul_omega_le
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: refine' ⟨fun h => _, fun h => _⟩
state_before: a b : Ordinal
⊢ a + b = b ↔ a * ω ≤ b

tactic: rw [← nfp_add_zero a, ← deriv_zero]
state_before: case refine'_1
a b : Ordinal
h : a + b = b
⊢ a * ω ≤ b

tactic: cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
state_before: case refine'_1
a b : Ordinal
h : a + b = b
⊢ deriv (fun x => a + x) 0 ≤ b

tactic: rw [← hc]
state_before: case refine'_1.intro
a b : Ordinal
h : a + b = b
c : Ordinal
hc : deriv ((fun x x_1 => x + x_1) a) c = b
⊢ deriv (fun x => a + x) 0 ≤ b

tactic: exact (deriv_isNormal _).monotone (Ordinal.zero_le _)
state_before: case refine'_1.intro
a b : Ordinal
h : a + b = b
c : Ordinal
hc : deriv ((fun x x_1 => x + x_1) a) c = b
⊢ deriv (fun x => a + x) 0 ≤ deriv ((fun x x_1 => x + x_1) a) c

tactic: have := Ordinal.add_sub_cancel_of_le h
state_before: case refine'_2
a b : Ordinal
h : a * ω ≤ b
⊢ a + b = b

tactic: nth_rw 1 [← this]
state_before: case refine'_2
a b : Ordinal
h : a * ω ≤ b
this : a * ω + (b - a * ω) = b
⊢ a + b = b

tactic: rwa [← add_assoc, ← mul_one_add, one_add_omega]
state_before: case refine'_2
a b : Ordinal
h : a * ω ≤ b
this : a * ω + (b - a * ω) = b
⊢ a + (a * ω + (b - a * ω)) = b
Theorem: isCongruenceSubgroup_trans
File: Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean

tactic: obtain ⟨N, hN⟩ := h2
state_before: N : ℕ
H K : Subgroup SL(2, ℤ)
h : H ≤ K
h2 : IsCongruenceSubgroup H
⊢ IsCongruenceSubgroup K

tactic: refine' ⟨N, le_trans hN h⟩
state_before: case intro
N✝ : ℕ
H K : Subgroup SL(2, ℤ)
h : H ≤ K
N : ℕ+
hN : Gamma ↑N ≤ H
⊢ IsCongruenceSubgroup K
Theorem: Nat.mul_mod_right
File: Std/Data/Nat/Lemmas.lean

tactic: rw [← Nat.zero_add (m * n), add_mul_mod_self_left, zero_mod]
state_before: m n : Nat
⊢ m * n % m = 0
Theorem: HasSum.update
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: convert (hasSum_ite_eq b (a - f b)).add hf
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
⊢ HasSum (Function.update f b a) (a - f b + a₁)

tactic: rename_i b'
state_before: case h.e'_5.h
α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
x✝ : β
⊢ Function.update f b a x✝ = (if x✝ = b then a - f b else 0) + f x✝

tactic: by_cases h : b' = b
state_before: case h.e'_5.h
α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
b' : β
⊢ Function.update f b a b' = (if b' = b then a - f b else 0) + f b'

tactic: . simp only [h, update_noteq, if_false, Ne.def, zero_add, not_false_iff]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
b' : β
h : ¬b' = b
⊢ Function.update f b a b' = (if b' = b then a - f b else 0) + f b'

tactic: rw [h, update_same]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
b' : β
h : b' = b
⊢ Function.update f b a b' = (if b' = b then a - f b else 0) + f b'

tactic: simp [eq_self_iff_true, if_true, sub_add_cancel]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
b' : β
h : b' = b
⊢ a = (if b = b then a - f b else 0) + f b

tactic: simp only [h, update_noteq, if_false, Ne.def, zero_add, not_false_iff]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.408116
δ : Type ?u.408119
inst✝³ : AddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
f g : β → α
a✝ a₁ a₂ : α
hf : HasSum f a₁
b : β
inst✝ : DecidableEq β
a : α
b' : β
h : ¬b' = b
⊢ Function.update f b a b' = (if b' = b then a - f b else 0) + f b'
Theorem: BoxIntegral.Box.coe_inf
File: Mathlib/Analysis/BoxIntegral/Box/Basic.lean

tactic: induction I using WithBot.recBotCoe
state_before: ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑(I ⊓ J) = ↑I ∩ ↑J

tactic: induction J using WithBot.recBotCoe
state_before: case coe
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
a✝ : Box ι
⊢ ↑(↑a✝ ⊓ J) = ↑↑a✝ ∩ ↑J

tactic: change ((mk' _ _ : WithBot (Box ι)) : Set (ι → ℝ)) = _
state_before: case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑(↑a✝¹ ⊓ ↑a✝) = ↑↑a✝¹ ∩ ↑↑a✝

tactic: simp only [coe_eq_pi, ← pi_inter_distrib, Ioc_inter_Ioc, Pi.sup_apply, Pi.inf_apply, coe_mk',
  coe_coe]
state_before: case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑(mk' (fun i => (a✝¹.lower ⊔ a✝.lower) i) fun i => (a✝¹.upper ⊓ a✝.upper) i) = ↑↑a✝¹ ∩ ↑↑a✝

tactic: change ∅ = _
state_before: case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ↑(⊥ ⊓ J) = ↑⊥ ∩ ↑J

tactic: simp
state_before: case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ∅ = ↑⊥ ∩ ↑J

tactic: change ∅ = _
state_before: case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ↑(↑a✝ ⊓ ⊥) = ↑↑a✝ ∩ ↑⊥

tactic: simp
state_before: case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ∅ = ↑↑a✝ ∩ ↑⊥
Theorem: Polynomial.derivative_C_mul_X
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: simp [C_mul_X_eq_monomial, derivative_monomial, Nat.cast_one, mul_one]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a✝ b : R
n : ℕ
inst✝ : Semiring R
a : R
⊢ ↑derivative (↑C a * X) = ↑C a
Theorem: Polynomial.eta
File: Mathlib/Data/Polynomial/Basic.lean

tactic: cases f
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q f : R[X]
⊢ { toFinsupp := f.toFinsupp } = f

tactic: rfl
state_before: case ofFinsupp
R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ { toFinsupp := { toFinsupp := toFinsupp✝ }.toFinsupp } = { toFinsupp := toFinsupp✝ }
Theorem: isGδ_setOf_continuousAt
File: Mathlib/Topology/GDelta.lean

tactic: obtain ⟨U, _, hU⟩ := (@uniformity_hasBasis_open_symmetric β _).exists_antitone_subbasis
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.13373
ι : Type ?u.13376
inst✝² : TopologicalSpace α
inst✝¹ : UniformSpace β
inst✝ : IsCountablyGenerated (uniformity β)
f : α → β
⊢ IsGδ {x | ContinuousAt f x}

tactic: simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
state_before: case intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.13373
ι : Type ?u.13376
inst✝² : TopologicalSpace α
inst✝¹ : UniformSpace β
inst✝ : IsCountablyGenerated (uniformity β)
f : α → β
U : ℕ → Set (β × β)
left✝ : ∀ (i : ℕ), U i ∈ uniformity β ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : HasAntitoneBasis (uniformity β) fun i => id (U i)
⊢ IsGδ {x | ContinuousAt f x}

tactic: simp only [(nhds_basis_opens _).prod_self.tendsto_iff hU.toHasBasis, forall_prop_of_true,
  setOf_forall, id]
state_before: case intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.13373
ι : Type ?u.13376
inst✝² : TopologicalSpace α
inst✝¹ : UniformSpace β
inst✝ : IsCountablyGenerated (uniformity β)
f : α → β
U : ℕ → Set (β × β)
left✝ : ∀ (i : ℕ), U i ∈ uniformity β ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : HasAntitoneBasis (uniformity β) fun i => id (U i)
⊢ IsGδ {x | Tendsto (fun x => (f x.fst, f x.snd)) (𝓝 x ×ˢ 𝓝 x) (uniformity β)}

tactic: refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
state_before: case intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.13373
ι : Type ?u.13376
inst✝² : TopologicalSpace α
inst✝¹ : UniformSpace β
inst✝ : IsCountablyGenerated (uniformity β)
f : α → β
U : ℕ → Set (β × β)
left✝ : ∀ (i : ℕ), U i ∈ uniformity β ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : HasAntitoneBasis (uniformity β) fun i => id (U i)
⊢ IsGδ (⋂ (i : ℕ), {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ (x : α × α), x ∈ ia ×ˢ ia → (f x.fst, f x.snd) ∈ U i})

tactic: rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
state_before: case intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.13373
ι : Type ?u.13376
inst✝² : TopologicalSpace α
inst✝¹ : UniformSpace β
inst✝ : IsCountablyGenerated (uniformity β)
f : α → β
U : ℕ → Set (β × β)
left✝ : ∀ (i : ℕ), U i ∈ uniformity β ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : HasAntitoneBasis (uniformity β) fun i => id (U i)
k : ℕ
x : α
⊢ x ∈ {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ (x : α × α), x ∈ ia ×ˢ ia → (f x.fst, f x.snd) ∈ U k} →
    {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ (x : α × α), x ∈ ia ×ˢ ia → (f x.fst, f x.snd) ∈ U k} ∈ 𝓝 x

tactic: filter_upwards [IsOpen.mem_nhds hso hsx]with _ hy using⟨s, ⟨hy, hso⟩, hsU⟩
state_before: case intro.intro.intro.intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.13373
ι : Type ?u.13376
inst✝² : TopologicalSpace α
inst✝¹ : UniformSpace β
inst✝ : IsCountablyGenerated (uniformity β)
f : α → β
U : ℕ → Set (β × β)
left✝ : ∀ (i : ℕ), U i ∈ uniformity β ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : HasAntitoneBasis (uniformity β) fun i => id (U i)
k : ℕ
x : α
s : Set α
hsU : ∀ (x : α × α), x ∈ s ×ˢ s → (f x.fst, f x.snd) ∈ U k
hsx : x ∈ s
hso : IsOpen s
⊢ {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ (x : α × α), x ∈ ia ×ˢ ia → (f x.fst, f x.snd) ∈ U k} ∈ 𝓝 x
Theorem: IsClosed.mem_iff_infDist_zero
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rw [← mem_closure_iff_infDist_zero hs, h.closure_eq]
state_before: ι : Sort ?u.65829
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
h : IsClosed s
hs : Set.Nonempty s
⊢ x ∈ s ↔ infDist x s = 0
Theorem: Finset.card_insert_eq_ite
File: Mathlib/Data/Finset/Card.lean

tactic: by_cases h : a ∈ s
state_before: α : Type u_1
β : Type ?u.5325
s t : Finset α
a b : α
inst✝ : DecidableEq α
⊢ card (insert a s) = if a ∈ s then card s else card s + 1

tactic: rw [card_insert_of_mem h, if_pos h]
state_before: case pos
α : Type u_1
β : Type ?u.5325
s t : Finset α
a b : α
inst✝ : DecidableEq α
h : a ∈ s
⊢ card (insert a s) = if a ∈ s then card s else card s + 1

tactic: rw [card_insert_of_not_mem h, if_neg h]
state_before: case neg
α : Type u_1
β : Type ?u.5325
s t : Finset α
a b : α
inst✝ : DecidableEq α
h : ¬a ∈ s
⊢ card (insert a s) = if a ∈ s then card s else card s + 1
Theorem: tendsto_atBot_isGLB
File: Mathlib/Topology/Algebra/Order/MonotoneConvergence.lean

tactic: convert tendsto_atTop_isLUB h_mono.dual ha.dual using 1
state_before: α : Type u_2
β : Type ?u.9202
ι : Type u_1
inst✝³ : Preorder ι
inst✝² : TopologicalSpace α
inst✝¹ : Preorder α
inst✝ : InfConvergenceClass α
f : ι → α
a : α
h_mono : Monotone f
ha : IsGLB (range f) a
⊢ Tendsto f atBot (𝓝 a)
Theorem: mul_bit0
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: dsimp [bit0]
state_before: α : Type ?u.269208
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : NonUnitalNonAssocRing R
n r : R
⊢ r * bit0 n = 2 • (r * n)

tactic: rw [mul_add, ← one_add_one_eq_two, add_zsmul, one_zsmul]
state_before: α : Type ?u.269208
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : NonUnitalNonAssocRing R
n r : R
⊢ r * (n + n) = 2 • (r * n)
Theorem: BoxIntegral.Prepartition.tag_biUnionTagged
File: Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean

tactic: rw [← π.biUnionIndex_of_mem (πi := fun J => (πi J).toPrepartition) hJ hJ']
state_before: ι : Type u_1
I J : Box ι
π : Prepartition I
πi : (J : Box ι) → TaggedPrepartition J
hJ : J ∈ π
J' : Box ι
hJ' : J' ∈ πi J
⊢ TaggedPrepartition.tag (biUnionTagged π πi) J' = TaggedPrepartition.tag (πi J) J'

tactic: rfl
state_before: ι : Type u_1
I J : Box ι
π : Prepartition I
πi : (J : Box ι) → TaggedPrepartition J
hJ : J ∈ π
J' : Box ι
hJ' : J' ∈ πi J
⊢ TaggedPrepartition.tag (biUnionTagged π πi) J' =
    TaggedPrepartition.tag (πi (biUnionIndex π (fun J => (πi J).toPrepartition) J')) J'
Theorem: PadicInt.norm_eq_of_norm_add_lt_right
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: rw [norm_add_eq_max_of_ne hne]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ_[p]
h : ‖z1 + z2‖ < ‖z2‖
hne : ¬‖z1‖ = ‖z2‖
⊢ ‖z1 + z2‖ ≥ ‖z2‖

tactic: apply le_max_right
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ_[p]
h : ‖z1 + z2‖ < ‖z2‖
hne : ¬‖z1‖ = ‖z2‖
⊢ max ‖z1‖ ‖z2‖ ≥ ‖z2‖
Theorem: Set.diff_iInter
File: Mathlib/Data/Set/Lattice.lean

tactic: rw [diff_eq, compl_iInter, inter_iUnion]
state_before: α : Type ?u.72372
β : Type u_1
γ : Type ?u.72378
ι : Sort u_2
ι' : Sort ?u.72384
ι₂ : Sort ?u.72387
κ : ι → Sort ?u.72392
κ₁ : ι → Sort ?u.72397
κ₂ : ι → Sort ?u.72402
κ' : ι' → Sort ?u.72407
s : Set β
t : ι → Set β
⊢ (s \ ⋂ (i : ι), t i) = ⋃ (i : ι), s \ t i

tactic: rfl
state_before: α : Type ?u.72372
β : Type u_1
γ : Type ?u.72378
ι : Sort u_2
ι' : Sort ?u.72384
ι₂ : Sort ?u.72387
κ : ι → Sort ?u.72392
κ₁ : ι → Sort ?u.72397
κ₂ : ι → Sort ?u.72402
κ' : ι' → Sort ?u.72407
s : Set β
t : ι → Set β
⊢ (⋃ (i : ι), s ∩ t iᶜ) = ⋃ (i : ι), s \ t i
Theorem: Real.Angle.sin_eq_iff_eq_or_add_eq_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: induction ψ using Real.Angle.induction_on
state_before: θ ψ : Angle
⊢ sin θ = sin ψ ↔ θ = ψ ∨ θ + ψ = ↑π

tactic: exact sin_eq_real_sin_iff_eq_or_add_eq_pi
state_before: case h
θ : Angle
x✝ : ℝ
⊢ sin θ = sin ↑x✝ ↔ θ = ↑x✝ ∨ θ + ↑x✝ = ↑π
Theorem: vectorSpan_range_eq_span_range_vsub_right
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [vectorSpan_eq_span_vsub_set_right k (Set.mem_range_self i0), ← Set.range_comp]
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
i0 : ι
⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p i -ᵥ p i0)

tactic: congr
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
i0 : ι
⊢ Submodule.span k (range ((fun x => x -ᵥ p i0) ∘ p)) = Submodule.span k (range fun i => p i -ᵥ p i0)
Theorem: Dfinsupp.prod_finset_sum_index
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: classical
exact Finset.induction_on s (by simp [prod_zero_index])
      (by simp (config := { contextual := true }) [prod_add_index, h_zero, h_add])
state_before: ι : Type u
γ✝ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
γ : Type w
α : Type x
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
s : Finset α
g : α → Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
⊢ ∏ i in s, prod (g i) h = prod (∑ i in s, g i) h

tactic: exact Finset.induction_on s (by simp [prod_zero_index])
      (by simp (config := { contextual := true }) [prod_add_index, h_zero, h_add])
state_before: ι : Type u
γ✝ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
γ : Type w
α : Type x
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
s : Finset α
g : α → Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
⊢ ∏ i in s, prod (g i) h = prod (∑ i in s, g i) h

tactic: simp [prod_zero_index]
state_before: ι : Type u
γ✝ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
γ : Type w
α : Type x
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
s : Finset α
g : α → Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
⊢ ∏ i in ∅, prod (g i) h = prod (∑ i in ∅, g i) h

tactic: simp (config := { contextual := true }) [prod_add_index, h_zero, h_add]
state_before: ι : Type u
γ✝ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
γ : Type w
α : Type x
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
s : Finset α
g : α → Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
⊢ ∀ ⦃a : α⦄ {s : Finset α},
    ¬a ∈ s →
      ∏ i in s, prod (g i) h = prod (∑ i in s, g i) h →
        ∏ i in insert a s, prod (g i) h = prod (∑ i in insert a s, g i) h
Theorem: exists_one_lt'
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: obtain ⟨y, hy⟩ := Decidable.exists_ne (1 : α)
state_before: α : Type u
inst✝¹ : LinearOrderedCommGroup α
a b c : α
inst✝ : Nontrivial α
⊢ ∃ a, 1 < a

tactic: obtain h|h := hy.lt_or_lt
state_before: case intro
α : Type u
inst✝¹ : LinearOrderedCommGroup α
a b c : α
inst✝ : Nontrivial α
y : α
hy : y ≠ 1
⊢ ∃ a, 1 < a

tactic: exact ⟨y⁻¹, one_lt_inv'.mpr h⟩
state_before: case intro.inl
α : Type u
inst✝¹ : LinearOrderedCommGroup α
a b c : α
inst✝ : Nontrivial α
y : α
hy : y ≠ 1
h : y < 1
⊢ ∃ a, 1 < a

tactic: exact ⟨y, h⟩
state_before: case intro.inr
α : Type u
inst✝¹ : LinearOrderedCommGroup α
a b c : α
inst✝ : Nontrivial α
y : α
hy : y ≠ 1
h : 1 < y
⊢ ∃ a, 1 < a
Theorem: ZMod.ker_int_castAddHom
File: Mathlib/Data/ZMod/Basic.lean

tactic: ext
state_before: n : ℕ
⊢ AddMonoidHom.ker (Int.castAddHom (ZMod n)) = AddSubgroup.zmultiples ↑n

tactic: rw [Int.mem_zmultiples_iff, AddMonoidHom.mem_ker, Int.coe_castAddHom,
  int_cast_zmod_eq_zero_iff_dvd]
state_before: case h
n : ℕ
x✝ : ℤ
⊢ x✝ ∈ AddMonoidHom.ker (Int.castAddHom (ZMod n)) ↔ x✝ ∈ AddSubgroup.zmultiples ↑n
Theorem: Finsupp.support_indicator_subset
File: Mathlib/Data/Finsupp/Indicator.lean

tactic: intro i hi
state_before: ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : (i : ι) → i ∈ s → α
i : ι
⊢ ↑(indicator s f).support ⊆ ↑s

tactic: rw [mem_coe, mem_support_iff] at hi
state_before: ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : (i : ι) → i ∈ s → α
i✝ i : ι
hi : i ∈ ↑(indicator s f).support
⊢ i ∈ ↑s

tactic: by_contra h
state_before: ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : (i : ι) → i ∈ s → α
i✝ i : ι
hi : ↑(indicator s f) i ≠ 0
⊢ i ∈ ↑s

tactic: exact hi (indicator_of_not_mem h _)
state_before: ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : (i : ι) → i ∈ s → α
i✝ i : ι
hi : ↑(indicator s f) i ≠ 0
h : ¬i ∈ ↑s
⊢ False
Theorem: UnionFind.parent_lt
File: Mathlib/Data/UnionFind.lean

tactic: let ⟨m, hm⟩ := self.model'
state_before: α : Type u_1
self : UnionFind α
i : ℕ
h : i < Array.size self.arr
⊢ self.arr[i].parent < size self

tactic: simp [hm.parent_eq, size, (m.parent ⟨i, h⟩).2, h]
state_before: α : Type u_1
self : UnionFind α
i : ℕ
h : i < Array.size self.arr
m : UFModel (Array.size self.arr)
hm : UFModel.Models self.arr m
⊢ self.arr[i].parent < size self
Theorem: Filter.principal_le_iff
File: Mathlib/Order/Filter/Basic.lean

tactic: change (∀ V, V ∈ f → V ∈ _) ↔ _
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.120295
ι : Sort x
f✝ g : Filter α
s✝ t s : Set α
f : Filter α
⊢ 𝓟 s ≤ f ↔ ∀ (V : Set α), V ∈ f → s ⊆ V

tactic: simp_rw [mem_principal]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.120295
ι : Sort x
f✝ g : Filter α
s✝ t s : Set α
f : Filter α
⊢ (∀ (V : Set α), V ∈ f → V ∈ 𝓟 s) ↔ ∀ (V : Set α), V ∈ f → s ⊆ V