tasksource/leandojo huggingface dataset:
Theorem: Set.sigma_eq_empty_iff
File: Mathlib/Data/Set/Sigma.lean

tactic: simp only [not_nonempty_iff_eq_empty, not_and, not_exists]
state_before: ι : Type u_1
ι' : Type ?u.30556
α : ι → Type u_2
β : ι → Type ?u.30566
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a : α i
⊢ (¬∃ i, i ∈ s ∧ Set.Nonempty (t i)) ↔ ∀ (i : ι), i ∈ s → t i = ∅
Theorem: List.Nat.antidiagonal_succ'
File: Mathlib/Data/List/NatAntidiagonal.lean

tactic: simp only [antidiagonal, range_succ, add_tsub_cancel_left, map_append, append_assoc, tsub_self,
  singleton_append, map_map, map]
state_before: n : ℕ
⊢ antidiagonal (n + 1) = map (Prod.map id succ) (antidiagonal n) ++ [(n + 1, 0)]

tactic: congr 1
state_before: n : ℕ
⊢ map (fun i => (i, n + 1 - i)) (range n) ++ [(n, 1), (n + 1, 0)] =
    map (Prod.map id succ ∘ fun i => (i, n - i)) (range n) ++ [Prod.map id succ (n, 0), (n + 1, 0)]

tactic: apply map_congr
state_before: case e_a
n : ℕ
⊢ map (fun i => (i, n + 1 - i)) (range n) = map (Prod.map id succ ∘ fun i => (i, n - i)) (range n)

tactic: simp (config := { contextual := true }) [le_of_lt, Nat.succ_eq_add_one, Nat.sub_add_comm]
state_before: case e_a.a
n : ℕ
⊢ ∀ (x : ℕ), x ∈ range n → (x, n + 1 - x) = (Prod.map id succ ∘ fun i => (i, n - i)) x
Theorem: Ordinal.blsub_le_of_brange_subset
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: obtain ⟨c, hc, hc'⟩ := h ⟨b, hb, rfl⟩
state_before: α : Type ?u.360714
β : Type ?u.360717
γ : Type ?u.360720
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
o' : Ordinal
f : (a : Ordinal) → a < o → Ordinal
g : (a : Ordinal) → a < o' → Ordinal
h : brange o f ⊆ brange o' g
a : Ordinal
x✝ : a ∈ brange o fun a ha => succ (f a ha)
b : Ordinal
hb : b < o
hb' : (fun a ha => succ (f a ha)) b hb = a
⊢ a ∈ brange o' fun a ha => succ (g a ha)

tactic: simp_rw [← hc'] at hb'
state_before: case intro.intro
α : Type ?u.360714
β : Type ?u.360717
γ : Type ?u.360720
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
o' : Ordinal
f : (a : Ordinal) → a < o → Ordinal
g : (a : Ordinal) → a < o' → Ordinal
h : brange o f ⊆ brange o' g
a : Ordinal
x✝ : a ∈ brange o fun a ha => succ (f a ha)
b : Ordinal
hb : b < o
hb' : (fun a ha => succ (f a ha)) b hb = a
c : Ordinal
hc : c < o'
hc' : g c hc = f b hb
⊢ a ∈ brange o' fun a ha => succ (g a ha)

tactic: exact ⟨c, hc, hb'⟩
state_before: case intro.intro
α : Type ?u.360714
β : Type ?u.360717
γ : Type ?u.360720
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
o' : Ordinal
f : (a : Ordinal) → a < o → Ordinal
g : (a : Ordinal) → a < o' → Ordinal
h : brange o f ⊆ brange o' g
a : Ordinal
x✝ : a ∈ brange o fun a ha => succ (f a ha)
b : Ordinal
hb : b < o
c : Ordinal
hc : c < o'
hc' : g c hc = f b hb
hb' : succ (g c hc) = a
⊢ a ∈ brange o' fun a ha => succ (g a ha)
Theorem: WithBot.image_coe_Ioc
File: Mathlib/Data/Set/Intervals/WithBotTop.lean

tactic: rw [← preimage_coe_Ioc, image_preimage_eq_inter_range, range_coe,
  inter_eq_self_of_subset_left (Subset.trans Ioc_subset_Ioi_self <| Ioi_subset_Ioi bot_le)]
state_before: α : Type u_1
inst✝ : PartialOrder α
a b : α
⊢ some '' Ioc a b = Ioc ↑a ↑b
Theorem: Irrational.of_zpow
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [zpow_ofNat] at h
state_before: q : ℚ
x y : ℝ
n : ℕ
h : Irrational (x ^ ↑n)
⊢ Irrational x

tactic: exact h.of_pow _
state_before: q : ℚ
x y : ℝ
n : ℕ
h : Irrational (x ^ n)
⊢ Irrational x

tactic: rw [zpow_negSucc] at h
state_before: q : ℚ
x y : ℝ
n : ℕ
h : Irrational (x ^ -[n+1])
⊢ Irrational x

tactic: exact h.of_inv.of_pow _
state_before: q : ℚ
x y : ℝ
n : ℕ
h : Irrational (x ^ (n + 1))⁻¹
⊢ Irrational x
Theorem: intermediate_value_univ₂
File: Mathlib/Topology/Algebra/Order/IntermediateValue.lean

tactic: obtain ⟨x, _, hfg, hgf⟩ : (univ ∩ { x | f x ≤ g x ∧ g x ≤ f x }).Nonempty
state_before: X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
inst✝ : PreconnectedSpace X
a b : X
f g : X → α
hf : Continuous f
hg : Continuous g
ha : f a ≤ g a
hb : g b ≤ f b
⊢ ∃ x, f x = g x

tactic: exact
  isPreconnected_closed_iff.1 PreconnectedSpace.isPreconnected_univ _ _ (isClosed_le hf hg)
    (isClosed_le hg hf) (fun _ _ => le_total _ _) ⟨a, trivial, ha⟩ ⟨b, trivial, hb⟩
state_before: X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
inst✝ : PreconnectedSpace X
a b : X
f g : X → α
hf : Continuous f
hg : Continuous g
ha : f a ≤ g a
hb : g b ≤ f b
⊢ Set.Nonempty (univ ∩ {x | f x ≤ g x ∧ g x ≤ f x})

case intro.intro.intro
X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
inst✝ : PreconnectedSpace X
a b : X
f g : X → α
hf : Continuous f
hg : Continuous g
ha : f a ≤ g a
hb : g b ≤ f b
x : X
left✝ : x ∈ univ
hfg : f x ≤ g x
hgf : g x ≤ f x
⊢ ∃ x, f x = g x

tactic: exact ⟨x, le_antisymm hfg hgf⟩
state_before: case intro.intro.intro
X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
inst✝ : PreconnectedSpace X
a b : X
f g : X → α
hf : Continuous f
hg : Continuous g
ha : f a ≤ g a
hb : g b ≤ f b
x : X
left✝ : x ∈ univ
hfg : f x ≤ g x
hgf : g x ≤ f x
⊢ ∃ x, f x = g x
Theorem: CategoryTheory.NatTrans.epi_of_epi_app
File: Mathlib/CategoryTheory/Functor/Category.lean

tactic: ext X
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
E : Type u₃
inst✝¹ : Category E
F G H I : C ⥤ D
α : F ⟶ G
inst✝ : ∀ (X : C), Epi (α.app X)
Z✝ : C ⥤ D
g h : G ⟶ Z✝
eq : α ≫ g = α ≫ h
⊢ g = h

tactic: rw [← cancel_epi (α.app X), ← comp_app, eq, comp_app]
state_before: case w.h
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
E : Type u₃
inst✝¹ : Category E
F G H I : C ⥤ D
α : F ⟶ G
inst✝ : ∀ (X : C), Epi (α.app X)
Z✝ : C ⥤ D
g h : G ⟶ Z✝
eq : α ≫ g = α ≫ h
X : C
⊢ g.app X = h.app X
Theorem: LinearMap.rTensor_pow
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: have h := TensorProduct.map_pow f (id : N →ₗ[R] N) n
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1300762
inst✝¹³ : Monoid R'
R'' : Type ?u.1300768
inst✝¹² : Semiring R''
M : Type u_2
N : Type u_3
P : Type ?u.1300780
Q : Type ?u.1300783
S : Type ?u.1300786
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f✝ : N →ₗ[R] P
f : M →ₗ[R] M
n : ℕ
⊢ rTensor N f ^ n = rTensor N (f ^ n)

tactic: rwa [id_pow] at h
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1300762
inst✝¹³ : Monoid R'
R'' : Type ?u.1300768
inst✝¹² : Semiring R''
M : Type u_2
N : Type u_3
P : Type ?u.1300780
Q : Type ?u.1300783
S : Type ?u.1300786
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f✝ : N →ₗ[R] P
f : M →ₗ[R] M
n : ℕ
h : map f id ^ n = map (f ^ n) (id ^ n)
⊢ rTensor N f ^ n = rTensor N (f ^ n)
Theorem: CategoryTheory.isSeparating_op_iff
File: Mathlib/CategoryTheory/Generator.lean

tactic: refine' ⟨fun h𝒢 X Y f g hfg => _, fun h𝒢 X Y f g hfg => _⟩
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
⊢ IsSeparating (Set.op 𝒢) ↔ IsCoseparating 𝒢

tactic: refine' Quiver.Hom.op_inj (h𝒢 _ _ fun G hG h => Quiver.Hom.unop_inj _)
state_before: case refine'_1
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsSeparating (Set.op 𝒢)
X Y : C
f g : X ⟶ Y
hfg : ∀ (G : C), G ∈ 𝒢 → ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
⊢ f = g

tactic: simpa only [unop_comp, Quiver.Hom.unop_op] using hfg _ (Set.mem_op.1 hG) _
state_before: case refine'_1
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsSeparating (Set.op 𝒢)
X Y : C
f g : X ⟶ Y
hfg : ∀ (G : C), G ∈ 𝒢 → ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
G : Cᵒᵖ
hG : G ∈ Set.op 𝒢
h : G ⟶ Y.op
⊢ (h ≫ f.op).unop = (h ≫ g.op).unop

tactic: refine' Quiver.Hom.unop_inj (h𝒢 _ _ fun G hG h => Quiver.Hom.op_inj _)
state_before: case refine'_2
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsCoseparating 𝒢
X Y : Cᵒᵖ
f g : X ⟶ Y
hfg : ∀ (G : Cᵒᵖ), G ∈ Set.op 𝒢 → ∀ (h : G ⟶ X), h ≫ f = h ≫ g
⊢ f = g

tactic: simpa only [op_comp, Quiver.Hom.op_unop] using hfg _ (Set.op_mem_op.2 hG) _
state_before: case refine'_2
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsCoseparating 𝒢
X Y : Cᵒᵖ
f g : X ⟶ Y
hfg : ∀ (G : Cᵒᵖ), G ∈ Set.op 𝒢 → ∀ (h : G ⟶ X), h ≫ f = h ≫ g
G : C
hG : G ∈ 𝒢
h : X.unop ⟶ G
⊢ (f.unop ≫ h).op = (g.unop ≫ h).op
Theorem: ContinuousOn.le_sSup_image_Icc
File: Mathlib/Topology/Algebra/Order/Compact.lean

tactic: have := mem_image_of_mem f hc
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.75376
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
⊢ f c ≤ sSup (f '' Icc a b)

tactic: rw [h.image_Icc (hc.1.trans hc.2)] at this
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.75376
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
this : f c ∈ f '' Icc a b
⊢ f c ≤ sSup (f '' Icc a b)

tactic: exact this.2
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.75376
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
this : f c ∈ Icc (sInf (f '' Icc a b)) (sSup (f '' Icc a b))
⊢ f c ≤ sSup (f '' Icc a b)
Theorem: Set.isEmpty_coe_sort
File: Mathlib/Data/Set/Basic.lean

tactic: simpa using nonempty_iff_ne_empty
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
⊢ ¬IsEmpty ↑s ↔ ¬s = ∅
Theorem: multiplicity.lt_top_iff_finite
File: Mathlib/RingTheory/Multiplicity.lean

tactic: rw [lt_top_iff_ne_top, ne_top_iff_finite]
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ multiplicity a b < ⊤ ↔ Finite a b
Theorem: Finset.pairwiseDisjoint_range_singleton
File: Mathlib/Data/Finset/Pairwise.lean

tactic: rintro _ ⟨a, rfl⟩ _ ⟨b, rfl⟩ h
state_before: α : Type u_1
ι : Type ?u.1017
ι' : Type ?u.1020
⊢ Set.PairwiseDisjoint (Set.range singleton) id

tactic: exact disjoint_singleton.2 (ne_of_apply_ne _ h)
state_before: case intro.intro
α : Type u_1
ι : Type ?u.1017
ι' : Type ?u.1020
a b : α
h : {a} ≠ {b}
⊢ (Disjoint on id) {a} {b}
Theorem: Finset.mem_pow
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp [← mem_coe, coe_pow, Set.mem_pow]
state_before: F : Type ?u.408308
α : Type u_1
β : Type ?u.408314
γ : Type ?u.408317
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
⊢ a ∈ s ^ n ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a
Theorem: Equiv.Perm.SameCycle.exists_pow_eq'
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: classical
  rintro ⟨k, rfl⟩
  use (k % orderOf f).natAbs
  have h₀ := Int.coe_nat_pos.mpr (orderOf_pos f)
  have h₁ := Int.emod_nonneg k h₀.ne'
  rw [← zpow_ofNat, Int.natAbs_of_nonneg h₁, ← zpow_eq_mod_orderOf]
  refine' ⟨_, by rfl⟩
  rw [← Int.ofNat_lt, Int.natAbs_of_nonneg h₁]
  exact Int.emod_lt_of_pos _ h₀
state_before: ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x y z : α
inst✝ : Finite α
⊢ SameCycle f x y → ∃ i, i < orderOf f ∧ ↑(f ^ i) x = y

tactic: rintro ⟨k, rfl⟩
state_before: ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x y z : α
inst✝ : Finite α
⊢ SameCycle f x y → ∃ i, i < orderOf f ∧ ↑(f ^ i) x = y

tactic: use (k % orderOf f).natAbs
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
⊢ ∃ i, i < orderOf f ∧ ↑(f ^ i) x = ↑(f ^ k) x

tactic: have h₀ := Int.coe_nat_pos.mpr (orderOf_pos f)
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
⊢ Int.natAbs (k % ↑(orderOf f)) < orderOf f ∧ ↑(f ^ Int.natAbs (k % ↑(orderOf f))) x = ↑(f ^ k) x

tactic: have h₁ := Int.emod_nonneg k h₀.ne'
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
h₀ : 0 < ↑(orderOf f)
⊢ Int.natAbs (k % ↑(orderOf f)) < orderOf f ∧ ↑(f ^ Int.natAbs (k % ↑(orderOf f))) x = ↑(f ^ k) x

tactic: rw [← zpow_ofNat, Int.natAbs_of_nonneg h₁, ← zpow_eq_mod_orderOf]
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
h₀ : 0 < ↑(orderOf f)
h₁ : 0 ≤ k % ↑(orderOf f)
⊢ Int.natAbs (k % ↑(orderOf f)) < orderOf f ∧ ↑(f ^ Int.natAbs (k % ↑(orderOf f))) x = ↑(f ^ k) x

tactic: refine' ⟨_, by rfl⟩
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
h₀ : 0 < ↑(orderOf f)
h₁ : 0 ≤ k % ↑(orderOf f)
⊢ Int.natAbs (k % ↑(orderOf f)) < orderOf f ∧ ↑(f ^ k) x = ↑(f ^ k) x

tactic: rw [← Int.ofNat_lt, Int.natAbs_of_nonneg h₁]
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
h₀ : 0 < ↑(orderOf f)
h₁ : 0 ≤ k % ↑(orderOf f)
⊢ Int.natAbs (k % ↑(orderOf f)) < orderOf f

tactic: exact Int.emod_lt_of_pos _ h₀
state_before: case intro
ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
h₀ : 0 < ↑(orderOf f)
h₁ : 0 ≤ k % ↑(orderOf f)
⊢ k % ↑(orderOf f) < ↑(orderOf f)

tactic: rfl
state_before: ι : Type ?u.208122
α : Type u_1
β : Type ?u.208128
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
k : ℤ
h₀ : 0 < ↑(orderOf f)
h₁ : 0 ≤ k % ↑(orderOf f)
⊢ ↑(f ^ k) x = ↑(f ^ k) x
Theorem: ContinuousOn.preimage_closed_of_closed
File: Mathlib/Topology/ContinuousOn.lean

tactic: rcases continuousOn_iff_isClosed.1 hf t ht with ⟨u, hu⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.346278
δ : Type ?u.346281
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
t : Set β
hf : ContinuousOn f s
hs : IsClosed s
ht : IsClosed t
⊢ IsClosed (s ∩ f ⁻¹' t)

tactic: rw [inter_comm, hu.2]
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.346278
δ : Type ?u.346281
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
t : Set β
hf : ContinuousOn f s
hs : IsClosed s
ht : IsClosed t
u : Set α
hu : IsClosed u ∧ f ⁻¹' t ∩ s = u ∩ s
⊢ IsClosed (s ∩ f ⁻¹' t)

tactic: apply IsClosed.inter hu.1 hs
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.346278
δ : Type ?u.346281
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
t : Set β
hf : ContinuousOn f s
hs : IsClosed s
ht : IsClosed t
u : Set α
hu : IsClosed u ∧ f ⁻¹' t ∩ s = u ∩ s
⊢ IsClosed (u ∩ s)
Theorem: Finset.isUnit_iff
File: Mathlib/Data/Finset/Pointwise.lean

tactic: constructor
state_before: F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s t : Finset α
⊢ IsUnit s ↔ ∃ a, s = {a} ∧ IsUnit a

tactic: rintro ⟨u, rfl⟩
state_before: case mp
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s t : Finset α
⊢ IsUnit s → ∃ a, s = {a} ∧ IsUnit a

tactic: obtain ⟨a, b, ha, hb, h⟩ := Finset.mul_eq_one_iff.1 u.mul_inv
state_before: case mp.intro
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
t : Finset α
u : (Finset α)ˣ
⊢ ∃ a, ↑u = {a} ∧ IsUnit a

tactic: refine' ⟨a, ha, ⟨a, b, h, singleton_injective _⟩, rfl⟩
state_before: case mp.intro.intro.intro.intro.intro
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
t : Finset α
u : (Finset α)ˣ
a b : α
ha : ↑u = {a}
hb : ↑u⁻¹ = {b}
h : a * b = 1
⊢ ∃ a, ↑u = {a} ∧ IsUnit a

tactic: rw [← singleton_mul_singleton, ← ha, ← hb]
state_before: case mp.intro.intro.intro.intro.intro
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
t : Finset α
u : (Finset α)ˣ
a b : α
ha : ↑u = {a}
hb : ↑u⁻¹ = {b}
h : a * b = 1
⊢ {b * a} = {1}

tactic: exact u.inv_mul
state_before: case mp.intro.intro.intro.intro.intro
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
t : Finset α
u : (Finset α)ˣ
a b : α
ha : ↑u = {a}
hb : ↑u⁻¹ = {b}
h : a * b = 1
⊢ ↑u⁻¹ * ↑u = {1}

tactic: rintro ⟨a, rfl, ha⟩
state_before: case mpr
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s t : Finset α
⊢ (∃ a, s = {a} ∧ IsUnit a) → IsUnit s

tactic: exact ha.finset
state_before: case mpr.intro.intro
F : Type ?u.566270
α : Type u_1
β : Type ?u.566276
γ : Type ?u.566279
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
t : Finset α
a : α
ha : IsUnit a
⊢ IsUnit {a}
Theorem: TopologicalSpace.noetherianSpace_set_iff
File: Mathlib/Topology/NoetherianSpace.lean

tactic: simp only [noetherianSpace_iff_isCompact, embedding_subtype_val.isCompact_iff_isCompact_image,
  Subtype.forall_set_subtype]
state_before: α : Type u_1
β : Type ?u.5636
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s : Set α
⊢ NoetherianSpace ↑s ↔ ∀ (t : Set α), t ⊆ s → IsCompact t
Theorem: QuadraticForm.toMatrix'_comp
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: ext
state_before: S : Type ?u.561232
R : Type ?u.561235
R₁ : Type u_1
M : Type ?u.561241
n : Type w
inst✝⁵ : Fintype n
inst✝⁴ : CommRing R₁
inst✝³ : DecidableEq n
inst✝² : Invertible 2
m : Type w
inst✝¹ : DecidableEq m
inst✝ : Fintype m
Q : QuadraticForm R₁ (m → R₁)
f : (n → R₁) →ₗ[R₁] m → R₁
⊢ toMatrix' (comp Q f) = (↑LinearMap.toMatrix' f)ᵀ ⬝ toMatrix' Q ⬝ ↑LinearMap.toMatrix' f

tactic: simp only [QuadraticForm.associated_comp, BilinForm.toMatrix'_comp, toMatrix']
state_before: case a.h
S : Type ?u.561232
R : Type ?u.561235
R₁ : Type u_1
M : Type ?u.561241
n : Type w
inst✝⁵ : Fintype n
inst✝⁴ : CommRing R₁
inst✝³ : DecidableEq n
inst✝² : Invertible 2
m : Type w
inst✝¹ : DecidableEq m
inst✝ : Fintype m
Q : QuadraticForm R₁ (m → R₁)
f : (n → R₁) →ₗ[R₁] m → R₁
i✝ x✝ : n
⊢ toMatrix' (comp Q f) i✝ x✝ = ((↑LinearMap.toMatrix' f)ᵀ ⬝ toMatrix' Q ⬝ ↑LinearMap.toMatrix' f) i✝ x✝
Theorem: CategoryTheory.NonPreadditiveAbelian.diag_σ
File: Mathlib/CategoryTheory/Abelian/NonPreadditive.lean

tactic: rw [cokernel.condition_assoc, zero_comp]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : NonPreadditiveAbelian C
X : C
⊢ diag X ≫ σ = 0
Theorem: Turing.TM1.stmts_trans
File: Mathlib/Computability/TuringMachine.lean

tactic: simp only [stmts, Finset.mem_insertNone, Finset.mem_biUnion, Option.mem_def, Option.some.injEq,
  forall_eq', exists_imp, and_imp]
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
M : Λ → Stmt₁
S : Finset Λ
q₁ q₂ : Stmt₁
h₁ : q₁ ∈ stmts₁ q₂
⊢ some q₂ ∈ stmts M S → some q₁ ∈ stmts M S

tactic: exact fun l ls h₂ ↦ ⟨_, ls, stmts₁_trans h₂ h₁⟩
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
M : Λ → Stmt₁
S : Finset Λ
q₁ q₂ : Stmt₁
h₁ : q₁ ∈ stmts₁ q₂
⊢ ∀ (x : Λ), x ∈ S → q₂ ∈ stmts₁ (M x) → ∃ a, a ∈ S ∧ q₁ ∈ stmts₁ (M a)
Theorem: Polynomial.natDegree_mul_C_eq_of_mul_ne_zero
File: Mathlib/Data/Polynomial/Degree/Lemmas.lean

tactic: refine' eq_natDegree_of_le_mem_support (natDegree_mul_C_le p a) _
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
h : leadingCoeff p * a ≠ 0
⊢ natDegree (p * ↑C a) = natDegree p

tactic: refine' mem_support_iff.mpr _
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
h : leadingCoeff p * a ≠ 0
⊢ natDegree p ∈ support (p * ↑C a)

tactic: rwa [coeff_mul_C]
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
h : leadingCoeff p * a ≠ 0
⊢ coeff (p * ↑C a) (natDegree p) ≠ 0
Theorem: Fin.init_snoc
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: ext i
state_before: m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
⊢ init (snoc p x) = p

tactic: simp only [init, snoc, coe_castSucc, is_lt, cast_eq, dite_true]
state_before: case h
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i✝ : Fin n
y : α (↑castSucc i✝)
z : α (last n)
i : Fin n
⊢ init (snoc p x) i = p i

tactic: convert cast_eq rfl (p i)
state_before: case h
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i✝ : Fin n
y : α (↑castSucc i✝)
z : α (last n)
i : Fin n
⊢ p (castLT (↑castSucc i) (_ : ↑i < n)) = p i
Theorem: rank_span
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: haveI := nontrivial_of_invariantBasisNumber R
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.418383
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
v : ι → M
hv : LinearIndependent R v
⊢ Module.rank R { x // x ∈ span R (range v) } = (#↑(range v))

tactic: rw [← Cardinal.lift_inj, ← (Basis.span hv).mk_eq_rank,
  Cardinal.mk_range_eq_of_injective (@LinearIndependent.injective ι R M v _ _ _ _ hv)]
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.418383
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
v : ι → M
hv : LinearIndependent R v
this : Nontrivial R
⊢ Module.rank R { x // x ∈ span R (range v) } = (#↑(range v))
Theorem: ENNReal.ofReal_one
File: Mathlib/Data/Real/ENNReal.lean

tactic: simp [ENNReal.ofReal]
state_before: α : Type ?u.21149
β : Type ?u.21152
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ ENNReal.ofReal 1 = 1
Theorem: Nat.gcd_mul_gcd_of_coprime_of_mul_eq_mul
File: Std/Data/Nat/Gcd.lean

tactic: apply dvd_antisymm
state_before: c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ gcd a c * gcd b c = c

tactic: apply ((cop.gcd_left _).mul (cop.gcd_left _)).dvd_of_dvd_mul_right
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ gcd a c * gcd b c ∣ c

tactic: rw [← h]
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ gcd a c * gcd b c ∣ c * d

tactic: apply Nat.mul_dvd_mul (gcd_dvd ..).1 (gcd_dvd ..).1
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ gcd a c * gcd b c ∣ a * b

tactic: rw [gcd_comm a, gcd_comm b]
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ c ∣ gcd a c * gcd b c

tactic: refine Nat.dvd_trans ?_ (gcd_mul_dvd_mul_gcd ..)
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ c ∣ gcd c a * gcd c b

tactic: rw [h, gcd_mul_right_right d c]
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ c ∣ gcd c (a * b)

tactic: apply Nat.dvd_refl
state_before: case a
c d a b : Nat
cop : coprime c d
h : a * b = c * d
⊢ c ∣ c