-- Mathlib/Topology/Algebra/Order/Floor.lean
theorem ContinuousOn.comp_fract' {f : β → α → γ} (h : ContinuousOn (uncurry f) <| univ ×ˢ I)
    (hf : ∀ s, f s 0 = f s 1) : Continuous fun st : β × α => f st.1 (fract st.2)

Proof state:
case mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
ht : t ≠ ↑⌊t⌋
⊢ univ ×ˢ Icc 0 1 ∈ 𝓝 (Prod.map id fract (s, t))

Tactic:
exact prod_mem_nhds univ_mem (Icc_mem_nhds (fract_pos.2 ht) (fract_lt_one _))

Result:
no goals

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
⊢ Continuous fun st => f st.1 (fract st.2)

Tactic:
change Continuous (uncurry f ∘ Prod.map id fract)

Result:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
⊢ Continuous (uncurry f ∘ Prod.map id fract)

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
⊢ ∀ (x : β × α), ContinuousAt (uncurry f ∘ Prod.map id fract) x

Tactic:
rintro ⟨s, t⟩

Result:
case mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)

Proof state:
case mk.inl.intro.left.refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ 𝓝 s ×ˢ 𝓝[Ico 0 1] 1 ≤ 𝓝 s ×ˢ 𝓝[Icc 0 1] 1

Tactic:
exact Filter.prod_mono le_rfl (nhdsWithin_mono _ Ico_subset_Icc_self)

Result:
no goals

Proof state:
case mk.inl.intro.left
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ Tendsto (uncurry f ∘ Prod.map id fract) (𝓝 s ×ˢ 𝓝[<] ↑n) (𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n)))

Tactic:
refine (((h (s, 1) ⟨trivial, zero_le_one, le_rfl⟩).tendsto.mono_left ?_).comp
  (tendsto_id.prod_map (tendsto_fract_left _))).mono_right (le_of_eq ?_)

Result:
case mk.inl.intro.left.refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ 𝓝 s ×ˢ 𝓝[<] 1 ≤ 𝓝[univ ×ˢ Icc 0 1] (s, 1)

case mk.inl.intro.left.refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ 𝓝 (uncurry f (s, 1)) = 𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n))

Proof state:
case mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
ht : ¬∃ n, t = ↑n
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)

Tactic:
replace ht : t ≠ ⌊t⌋ := fun ht' => ht ⟨_, ht'⟩

Result:
case mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
ht : t ≠ ↑⌊t⌋
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)

Proof state:
case mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
ht : t ≠ ↑⌊t⌋
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)

Tactic:
refine (h.continuousAt ?_).comp (continuousAt_id.prodMap (continuousAt_fract ht))

Result:
case mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
ht : t ≠ ↑⌊t⌋
⊢ univ ×ˢ Icc 0 1 ∈ 𝓝 (Prod.map id fract (s, t))

Proof state:
case mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)

Tactic:
rcases em (∃ n : ℤ, t = n) with (⟨n, rfl⟩ | ht)

Result:
case mk.inl.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, ↑n)

case mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
t : α
ht : ¬∃ n, t = ↑n
⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)

Proof state:
case mk.inl.intro.left.refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ 𝓝 s ×ˢ 𝓝[<] 1 ≤ 𝓝[univ ×ˢ Icc 0 1] (s, 1)

Tactic:
rw [nhdsWithin_prod_eq, nhdsWithin_univ, ← nhdsWithin_Ico_eq_nhdsLT one_pos]

Result:
case mk.inl.intro.left.refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : FloorRing α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : β → α → γ
h : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)
hf : ∀ (s : β), f s 0 = f s 1
s : β
n : ℤ
⊢ 𝓝 s ×ˢ 𝓝[Ico 0 1] 1 ≤ 𝓝 s ×ˢ 𝓝[Icc 0 1] 1