harrywsanders/mathlib_extracted huggingface dataset:
-- Mathlib/Topology/Bornology/Constructions.lean
theorem isBounded_prod : IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t

Proof state:
case inr.inr
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
t : Set β
hs : s.Nonempty
ht : t.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t

Tactic:
simp only [hs.ne_empty, ht.ne_empty, isBounded_prod_of_nonempty (hs.prod ht), false_or]

Result:
no goals

Proof state:
case inl
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
t : Set β
⊢ IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t

Tactic:
simp

Result:
no goals

Proof state:
case inr
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
t : Set β
hs : s.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t

Tactic:
rcases t.eq_empty_or_nonempty with (rfl | ht)

Result:
case inr.inl
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
hs : s.Nonempty
⊢ IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅

case inr.inr
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
t : Set β
hs : s.Nonempty
ht : t.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t

Proof state:
case inr.inl
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
hs : s.Nonempty
⊢ IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅

Tactic:
simp

Result:
no goals

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
t : Set β
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t

Tactic:
rcases s.eq_empty_or_nonempty with (rfl | hs)

Result:
case inl
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
t : Set β
⊢ IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t

case inr
α : Type u_1
β : Type u_2
inst✝¹ : Bornology α
inst✝ : Bornology β
s : Set α
t : Set β
hs : s.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem contMDiffAt_iff {n : WithTop ℕ∞} {f : M → M'} {x : M} :
    ContMDiffAt I I' n f x ↔
      ContinuousAt f x ∧
        ContDiffWithinAt 𝕜 n (extChartAt I' (f x) ∘ f ∘ (extChartAt I x).symm) (range I)
          (extChartAt I x x) :=
  liftPropAt_iff.trans <| by rw [ContDiffWithinAtProp, preimage_univ, univ_inter]; rfl

Proof state:
𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
H : Type u_3
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
E' : Type u_5
inst✝⁴ : NormedAddCommGroup E'
inst✝³ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝² : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
n : WithTop ℕ∞
f : M → M'
x : M
⊢ ContinuousAt f x ∧
      ContDiffWithinAt 𝕜 n (↑I' ∘ (↑(chartAt H' (f x)) ∘ f ∘ ↑(chartAt H x).symm) ∘ ↑I.symm) (range ↑I)
        (↑I (↑(chartAt H x) x)) ↔
    ContinuousAt f x ∧
      ContDiffWithinAt 𝕜 n (↑(extChartAt I' (f x)) ∘ f ∘ ↑(extChartAt I x).symm) (range ↑I) (↑(extChartAt I x) x)

Tactic:
rfl

Result:
no goals

Proof state:
𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
H : Type u_3
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
E' : Type u_5
inst✝⁴ : NormedAddCommGroup E'
inst✝³ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝² : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
n : WithTop ℕ∞
f : M → M'
x : M
⊢ ContinuousAt f x ∧
      ContDiffWithinAtProp I I' n (↑(chartAt H' (f x)) ∘ f ∘ ↑(chartAt H x).symm) univ (↑(chartAt H x) x) ↔
    ContinuousAt f x ∧
      ContDiffWithinAt 𝕜 n (↑(extChartAt I' (f x)) ∘ f ∘ ↑(extChartAt I x).symm) (range ↑I) (↑(extChartAt I x) x)

Tactic:
rw [ContDiffWithinAtProp, preimage_univ, univ_inter]

Result:
𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
H : Type u_3
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
E' : Type u_5
inst✝⁴ : NormedAddCommGroup E'
inst✝³ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝² : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
n : WithTop ℕ∞
f : M → M'
x : M
⊢ ContinuousAt f x ∧
      ContDiffWithinAt 𝕜 n (↑I' ∘ (↑(chartAt H' (f x)) ∘ f ∘ ↑(chartAt H x).symm) ∘ ↑I.symm) (range ↑I)
        (↑I (↑(chartAt H x) x)) ↔
    ContinuousAt f x ∧
      ContDiffWithinAt 𝕜 n (↑(extChartAt I' (f x)) ∘ f ∘ ↑(extChartAt I x).symm) (range ↑I) (↑(extChartAt I x) x)
-- Mathlib/Order/Hom/Basic.lean
/-- If the images by an order embedding of two elements are disjoint,
then they are themselves disjoint. -/
lemma Disjoint.of_orderEmbedding [OrderBot α] [OrderBot β] {a₁ a₂ : α} :
    Disjoint (f a₁) (f a₂) → Disjoint a₁ a₂

Proof state:
α : Type u_2
β : Type u_3
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
f : α ↪o β
inst✝¹ : OrderBot α
inst✝ : OrderBot β
a₁ a₂ : α
h : Disjoint (f a₁) (f a₂)
x : α
h₁ : x ≤ a₁
h₂ : x ≤ a₂
⊢ x ≤ ⊥

Tactic:
rw [← f.le_iff_le] at h₁ h₂ ⊢

Result:
α : Type u_2
β : Type u_3
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
f : α ↪o β
inst✝¹ : OrderBot α
inst✝ : OrderBot β
a₁ a₂ : α
h : Disjoint (f a₁) (f a₂)
x : α
h₁ : f x ≤ f a₁
h₂ : f x ≤ f a₂
⊢ f x ≤ f ⊥

Proof state:
α : Type u_2
β : Type u_3
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
f : α ↪o β
inst✝¹ : OrderBot α
inst✝ : OrderBot β
a₁ a₂ : α
h : Disjoint (f a₁) (f a₂)
x : α
h₁ : f x ≤ f a₁
h₂ : f x ≤ f a₂
⊢ f x ≤ f ⊥

Tactic:
calc
  f x ≤ ⊥ := h h₁ h₂
  _ ≤ f ⊥ := bot_le

Result:
no goals

Proof state:
α : Type u_2
β : Type u_3
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
f : α ↪o β
inst✝¹ : OrderBot α
inst✝ : OrderBot β
a₁ a₂ : α
⊢ Disjoint (f a₁) (f a₂) → Disjoint a₁ a₂

Tactic:
intro h x h₁ h₂

Result:
α : Type u_2
β : Type u_3
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
f : α ↪o β
inst✝¹ : OrderBot α
inst✝ : OrderBot β
a₁ a₂ : α
h : Disjoint (f a₁) (f a₂)
x : α
h₁ : x ≤ a₁
h₂ : x ≤ a₂
⊢ x ≤ ⊥
-- Mathlib/Topology/LocalAtTarget.lean
theorem isLocallyClosed_iff_coe_preimage {s : Set β} :
    IsLocallyClosed s ↔ ∀ i, IsLocallyClosed ((↑) ⁻¹' s : Set (U i))

Proof state:
β : Type u_2
inst✝ : TopologicalSpace β
ι : Type u_3
U : ι → Opens β
hU : IsOpenCover U
s : Set β
⊢ IsLocallyClosed s ↔ ∀ (i : ι), IsLocallyClosed (Subtype.val ⁻¹' s)

Tactic:
have (i) : coborder ((↑) ⁻¹' s : Set (U i)) = Subtype.val ⁻¹' coborder s :=
  (U i).isOpen.isOpenEmbedding_subtypeVal.coborder_preimage _

Result:
β : Type u_2
inst✝ : TopologicalSpace β
ι : Type u_3
U : ι → Opens β
hU : IsOpenCover U
s : Set β
this : ∀ (i : ι), coborder (Subtype.val ⁻¹' s) = Subtype.val ⁻¹' coborder s
⊢ IsLocallyClosed s ↔ ∀ (i : ι), IsLocallyClosed (Subtype.val ⁻¹' s)

Proof state:
β : Type u_2
inst✝ : TopologicalSpace β
ι : Type u_3
U : ι → Opens β
hU : IsOpenCover U
s : Set β
this : ∀ (i : ι), coborder (Subtype.val ⁻¹' s) = Subtype.val ⁻¹' coborder s
⊢ IsLocallyClosed s ↔ ∀ (i : ι), IsLocallyClosed (Subtype.val ⁻¹' s)

Tactic:
simp [isLocallyClosed_iff_isOpen_coborder, hU.isOpen_iff_coe_preimage, this]

Result:
no goals
-- Mathlib/Algebra/Module/SpanRank.lean
theorem exists_span_set_card_eq_spanRank (p : Submodule R M) :
    ∃ s : Set M, #s = p.spanRank ∧ span R s = p

Proof state:
R : Type u_1
M : Type u
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
p : Submodule R M
⊢ ∃ s, #↑s = p.spanRank ∧ span R s = p

Tactic:
rw [spanRank]

Result:
R : Type u_1
M : Type u
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
p : Submodule R M
⊢ ∃ s, #↑s = ⨅ s, #↑↑s ∧ span R s = p

Proof state:
R : Type u_1
M : Type u
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
p : Submodule R M
⊢ ∃ s, #↑s = ⨅ s, #↑↑s ∧ span R s = p

Tactic:
obtain ⟨s, hs⟩ : ⨅ (s : {s : Set M // span R s = p}), #s ∈
  Set.range (fun (s : {s : Set M // span R s = p}) ↦ #s) := csInf_mem ⟨#p, ⟨⟨p, by simp⟩, rfl⟩⟩

Result:
case intro
R : Type u_1
M : Type u
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
p : Submodule R M
s : { s // span R s = p }
hs : (fun s => #↑↑s) s = ⨅ s, #↑↑s
⊢ ∃ s, #↑s = ⨅ s, #↑↑s ∧ span R s = p

Proof state:
case intro
R : Type u_1
M : Type u
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
p : Submodule R M
s : { s // span R s = p }
hs : (fun s => #↑↑s) s = ⨅ s, #↑↑s
⊢ ∃ s, #↑s = ⨅ s, #↑↑s ∧ span R s = p

Tactic:
exact ⟨s.1, ⟨hs, s.2⟩⟩

Result:
no goals

Proof state:
R : Type u_1
M : Type u
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
p : Submodule R M
⊢ span R ↑p = p

Tactic:
simp

Result:
no goals
-- Mathlib/CategoryTheory/Bicategory/Basic.lean
theorem rightUnitor_comp (f : a ⟶ b) (g : b ⟶ c) :
    (ρ_ (f ≫ g)).hom = (α_ f g (𝟙 c)).hom ≫ f ◁ (ρ_ g).hom

Proof state:
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ c
⊢ (ρ_ (f ≫ g)).hom = (α_ f g (𝟙 c)).hom ≫ f ◁ (ρ_ g).hom

Tactic:
simp

Result:
no goals
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
  | (n : ℕ), h => by
    rw [zpow_natCast, zero_pow]
    exact mod_cast h
  | -[n+1], _ => by simp [zero_pow n.succ_ne_zero]

Proof state:
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
h : ↑n ≠ 0
⊢ 0 ^ ↑n = 0

Tactic:
rw [zpow_natCast, zero_pow]

Result:
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
h : ↑n ≠ 0
⊢ n ≠ 0

Proof state:
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
h : ↑n ≠ 0
⊢ n ≠ 0

Tactic:
exact mod_cast h

Result:
no goals

Proof state:
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
x✝ : -[n+1] ≠ 0
⊢ 0 ^ -[n+1] = 0

Tactic:
simp [zero_pow n.succ_ne_zero]

Result:
no goals
-- Mathlib/Analysis/Calculus/DSlope.lean
theorem continuousOn_dslope (h : s ∈ 𝓝 a) :
    ContinuousOn (dslope f a) s ↔ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a

Proof state:
case intro.inl
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
s : Set 𝕜
hc : ContinuousOn f s
x : 𝕜
hx : x ∈ s
h : s ∈ 𝓝 x
hd : DifferentiableAt 𝕜 f x
⊢ ContinuousWithinAt (dslope f x) s x

case intro.inr
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
hc : ContinuousOn f s
hd : DifferentiableAt 𝕜 f a
x : 𝕜
hx : x ∈ s
hne : x ≠ a
⊢ ContinuousWithinAt (dslope f a) s x

Tactic:
exacts [(continuousAt_dslope_same.2 hd).continuousWithinAt,
  (continuousWithinAt_dslope_of_ne hne).2 (hc x hx)]

Result:
no goals

Proof state:
case intro
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
hc : ContinuousOn f s
hd : DifferentiableAt 𝕜 f a
x : 𝕜
hx : x ∈ s
⊢ ContinuousWithinAt (dslope f a) s x

Tactic:
rcases eq_or_ne x a with (rfl | hne)

Result:
case intro.inl
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
s : Set 𝕜
hc : ContinuousOn f s
x : 𝕜
hx : x ∈ s
h : s ∈ 𝓝 x
hd : DifferentiableAt 𝕜 f x
⊢ ContinuousWithinAt (dslope f x) s x

case intro.inr
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
hc : ContinuousOn f s
hd : DifferentiableAt 𝕜 f a
x : 𝕜
hx : x ∈ s
hne : x ≠ a
⊢ ContinuousWithinAt (dslope f a) s x

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
⊢ ContinuousOn (dslope f a) s ↔ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a

Tactic:
refine ⟨fun hc => ⟨hc.of_dslope, continuousAt_dslope_same.1 <| hc.continuousAt h⟩, ?_⟩

Result:
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
⊢ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a → ContinuousOn (dslope f a) s

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
⊢ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a → ContinuousOn (dslope f a) s

Tactic:
rintro ⟨hc, hd⟩ x hx

Result:
case intro
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
hc : ContinuousOn f s
hd : DifferentiableAt 𝕜 f a
x : 𝕜
hx : x ∈ s
⊢ ContinuousWithinAt (dslope f a) s x
-- Mathlib/Order/Basic.lean
lemma ltByCases_eq_iff {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} {p : P} :
    ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ (∃ h, h₃ h = p)

Proof state:
case refine_2
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
h : x = y
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p

Tactic:
simp only [h, lt_self_iff_false, ltByCases_eq, not_false_eq_true,
exists_prop_of_false, exists_prop_of_true, or_false, false_or]

Result:
no goals

Proof state:
case refine_3
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
h : y < x
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p

Tactic:
simp only [ltByCases_gt, exists_prop_of_true, h, h.not_lt, not_false_eq_true,
exists_prop_of_false, false_or, h.ne']

Result:
no goals

Proof state:
case refine_1
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
h : x < y
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p

Tactic:
simp only [ltByCases_lt, exists_prop_of_true, h, h.not_lt, not_false_eq_true,
exists_prop_of_false, or_false, h.ne]

Result:
no goals

Proof state:
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p

Tactic:
refine ltByCases x y (fun h => ?_) (fun h => ?_) (fun h => ?_)

Result:
case refine_1
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
h : x < y
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p

case refine_2
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
h : x = y
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p

case refine_3
α : Type u_2
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : P
h : y < x
⊢ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ ∃ h, h₃ h = p
-- Mathlib/Analysis/Calculus/BumpFunction/Normed.lean
theorem integral_normed : ∫ x, f.normed μ x ∂μ = 1

Proof state:
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : HasContDiffBump E
inst✝⁴ : MeasurableSpace E
c : E
f : ContDiffBump c
μ : Measure E
inst✝³ : BorelSpace E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : IsLocallyFiniteMeasure μ
inst✝ : μ.IsOpenPosMeasure
⊢ ∫ (x : E), f.normed μ x ∂μ = 1

Tactic:
simp_rw [ContDiffBump.normed, div_eq_mul_inv, mul_comm (f _), ← smul_eq_mul, integral_smul]

Result:
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : HasContDiffBump E
inst✝⁴ : MeasurableSpace E
c : E
f : ContDiffBump c
μ : Measure E
inst✝³ : BorelSpace E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : IsLocallyFiniteMeasure μ
inst✝ : μ.IsOpenPosMeasure
⊢ (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1

Proof state:
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : HasContDiffBump E
inst✝⁴ : MeasurableSpace E
c : E
f : ContDiffBump c
μ : Measure E
inst✝³ : BorelSpace E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : IsLocallyFiniteMeasure μ
inst✝ : μ.IsOpenPosMeasure
⊢ (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1

Tactic:
exact inv_mul_cancel₀ f.integral_pos.ne'

Result:
no goals
-- Mathlib/Data/PNat/Factors.lean
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.prod ∣ n ↔ u ≤ n.factorMultiset

Proof state:
u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n.factorMultiset.prod ↔ u ≤ n.factorMultiset := prod_dvd_iff
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset

Tactic:
rw [n.prod_factorMultiset] at h

Result:
u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n ↔ u ≤ n.factorMultiset
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset

Proof state:
u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n ↔ u ≤ n.factorMultiset
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset

Tactic:
exact h

Result:
no goals

Proof state:
u : PrimeMultiset
n : ℕ+
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset

Tactic:
let h := @prod_dvd_iff u n.factorMultiset

Result:
u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n.factorMultiset.prod ↔ u ≤ n.factorMultiset := prod_dvd_iff
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
@[to_additive (attr := simp)]
lemma subgroupClosure_mul_pow (hs : s.Nonempty) : ∀ n, closure s * s ^ n = closure s
  | 0 => by simp
  | n + 1 => by rw [pow_succ', ← mul_assoc, subgroupClosure_mul hs, subgroupClosure_mul_pow hs]

Proof state:
G : Type u_2
inst✝ : Group G
s : Set G
hs : s.Nonempty
⊢ ↑(closure s) * s ^ 0 = ↑(closure s)

Tactic:
simp

Result:
no goals

Proof state:
G : Type u_2
inst✝ : Group G
s : Set G
hs : s.Nonempty
n : ℕ
⊢ ↑(closure s) * s ^ (n + 1) = ↑(closure s)

Tactic:
rw [pow_succ', ← mul_assoc, subgroupClosure_mul hs, subgroupClosure_mul_pow hs]

Result:
no goals
-- Mathlib/NumberTheory/Divisors.lean
theorem map_div_left_divisors :
    n.divisors.map ⟨fun d => (n / d, d), fun _ _ => congr_arg Prod.snd⟩ =
      n.divisorsAntidiagonal

Proof state:
case a.h
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ map (Equiv.prodComm ℕ ℕ).toEmbedding (map { toFun := fun d => (n / d, d), inj' := ⋯ } n.divisors) ↔
    a✝ ∈ map (Equiv.prodComm ℕ ℕ).toEmbedding n.divisorsAntidiagonal

Tactic:
rw [map_swap_divisorsAntidiagonal, ← map_div_right_divisors, Finset.map_map]

Result:
case a.h
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ map ({ toFun := fun d => (n / d, d), inj' := ⋯ }.trans (Equiv.prodComm ℕ ℕ).toEmbedding) n.divisors ↔
    a✝ ∈ map { toFun := fun d => (d, n / d), inj' := ⋯ } n.divisors

Proof state:
n : ℕ
⊢ map { toFun := fun d => (n / d, d), inj' := ⋯ } n.divisors = n.divisorsAntidiagonal

Tactic:
apply Finset.map_injective (Equiv.prodComm _ _).toEmbedding

Result:
case a
n : ℕ
⊢ map (Equiv.prodComm ℕ ℕ).toEmbedding (map { toFun := fun d => (n / d, d), inj' := ⋯ } n.divisors) =
    map (Equiv.prodComm ℕ ℕ).toEmbedding n.divisorsAntidiagonal

Proof state:
case a.h
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ map ({ toFun := fun d => (n / d, d), inj' := ⋯ }.trans (Equiv.prodComm ℕ ℕ).toEmbedding) n.divisors ↔
    a✝ ∈ map { toFun := fun d => (d, n / d), inj' := ⋯ } n.divisors

Tactic:
simp

Result:
no goals

Proof state:
case a
n : ℕ
⊢ map (Equiv.prodComm ℕ ℕ).toEmbedding (map { toFun := fun d => (n / d, d), inj' := ⋯ } n.divisors) =
    map (Equiv.prodComm ℕ ℕ).toEmbedding n.divisorsAntidiagonal

Tactic:
ext

Result:
case a.h
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ map (Equiv.prodComm ℕ ℕ).toEmbedding (map { toFun := fun d => (n / d, d), inj' := ⋯ } n.divisors) ↔
    a✝ ∈ map (Equiv.prodComm ℕ ℕ).toEmbedding n.divisorsAntidiagonal
-- Mathlib/LinearAlgebra/Determinant.lean
theorem Basis.smul_det {G} [Group G] [DistribMulAction G M] [SMulCommClass G R M]
    (g : G) (v : ι → M) :
    (g • e).det v = e.det (g⁻¹ • v)

Proof state:
R : Type u_1
inst✝⁷ : CommRing R
M : Type u_2
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
ι : Type u_4
inst✝⁴ : DecidableEq ι
inst✝³ : Fintype ι
e : Basis ι R M
G : Type u_5
inst✝² : Group G
inst✝¹ : DistribMulAction G M
inst✝ : SMulCommClass G R M
g : G
v : ι → M
⊢ (g • e).det v = e.det (g⁻¹ • v)

Tactic:
simp_rw [det_apply, toMatrix_smul_left]

Result:
no goals
-- Mathlib/ModelTheory/Types.lean
theorem formula_mem_typeOf {φ : L.Formula α} :
    Formula.equivSentence φ ∈ T.typeOf v ↔ φ.Realize v

Proof state:
L : Language
T : L.Theory
α : Type w
M : Type w'
inst✝² : L.Structure M
inst✝¹ : Nonempty M
inst✝ : M ⊨ T
v : α → M
φ : L.Formula α
⊢ Formula.equivSentence φ ∈ T.typeOf v ↔ φ.Realize v

Tactic:
simp

Result:
no goals
-- Mathlib/Data/ZMod/Basic.lean
/-- The range of `(m * · + k)` on natural numbers is the set of elements `≥ k` in the
residue class of `k` mod `m`. -/
lemma Nat.range_mul_add (m k : ℕ) :
    Set.range (fun n : ℕ ↦ m * n + k) = {n : ℕ | (n : ZMod m) = k ∧ k ≤ n}

Proof state:
case h.refine_2
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₁ : ↑n = ↑k
H₂ : k ≤ n
⊢ ∃ y, n = k + m * y

Tactic:
obtain ⟨a, ha⟩ := le_iff_exists_add.mp H₂

Result:
case h.refine_2.intro
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₁ : ↑n = ↑k
H₂ : k ≤ n
a : ℕ
ha : n = k + a
⊢ ∃ y, n = k + m * y

Proof state:
case h
m k n : ℕ
⊢ (∃ y, m * y + k = n) ↔ ↑n = ↑k ∧ k ≤ n

Tactic:
conv => enter [1, 1, y]; rw [add_comm, eq_comm]

Result:
case h
m k n : ℕ
⊢ (∃ y, n = k + m * y) ↔ ↑n = ↑k ∧ k ≤ n

Proof state:
case h
m k n : ℕ
⊢ (n ∈ Set.range fun n => m * n + k) ↔ n ∈ {n | ↑n = ↑k ∧ k ≤ n}

Tactic:
simp only [Set.mem_range, Set.mem_setOf_eq]

Result:
case h
m k n : ℕ
⊢ (∃ y, m * y + k = n) ↔ ↑n = ↑k ∧ k ≤ n

Proof state:
case h.refine_2.intro
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₂ : k ≤ n
a : ℕ
ha : n = k + a
H₁ : m ∣ a
⊢ ∃ y, n = k + m * y

Tactic:
obtain ⟨b, rfl⟩ := H₁

Result:
case h.refine_2.intro.intro
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₂ : k ≤ n
b : ℕ
ha : n = k + m * b
⊢ ∃ y, n = k + m * y

Proof state:
case h
m k n : ℕ
⊢ (∃ y, n = k + m * y) ↔ ↑n = ↑k ∧ k ≤ n

Tactic:
refine ⟨fun ⟨a, ha⟩ ↦ ⟨?_, le_iff_exists_add.mpr ⟨_, ha⟩⟩, fun ⟨H₁, H₂⟩ ↦ ?_⟩

Result:
case h.refine_1
m k n : ℕ
x✝ : ∃ y, n = k + m * y
a : ℕ
ha : n = k + m * a
⊢ ↑n = ↑k

case h.refine_2
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₁ : ↑n = ↑k
H₂ : k ≤ n
⊢ ∃ y, n = k + m * y

Proof state:
m k : ℕ
⊢ (Set.range fun n => m * n + k) = {n | ↑n = ↑k ∧ k ≤ n}

Tactic:
ext n

Result:
case h
m k n : ℕ
⊢ (n ∈ Set.range fun n => m * n + k) ↔ n ∈ {n | ↑n = ↑k ∧ k ≤ n}

Proof state:
case h.refine_2.intro
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₁ : ↑n = ↑k
H₂ : k ≤ n
a : ℕ
ha : n = k + a
⊢ ∃ y, n = k + m * y

Tactic:
simp only [ha, Nat.cast_add, add_right_eq_self, ZMod.natCast_zmod_eq_zero_iff_dvd] at H₁

Result:
case h.refine_2.intro
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₂ : k ≤ n
a : ℕ
ha : n = k + a
H₁ : m ∣ a
⊢ ∃ y, n = k + m * y

Proof state:
case h.refine_2.intro.intro
m k n : ℕ
x✝ : ↑n = ↑k ∧ k ≤ n
H₂ : k ≤ n
b : ℕ
ha : n = k + m * b
⊢ ∃ y, n = k + m * y

Tactic:
exact ⟨b, ha⟩

Result:
no goals

Proof state:
case h.refine_1
m k n : ℕ
x✝ : ∃ y, n = k + m * y
a : ℕ
ha : n = k + m * a
⊢ ↑n = ↑k

Tactic:
simpa using congr_arg ((↑) : ℕ → ZMod m) ha

Result:
no goals
-- Mathlib/Data/Part.lean
theorem get_eq_get_of_eq (a : Part α) (ha : a.Dom) {b : Part α} (h : a = b) :
    a.get ha = b.get (h ▸ ha)

Proof state:
α : Type u_1
a : Part α
ha : a.Dom
b : Part α
h : a = b
⊢ a.get ha = b.get ⋯

Tactic:
congr

Result:
no goals