Zulip Chat Archive

Stream: new members

Topic: Convert Multiplicative Z to Z


Jakub Nowak (Jan 06 2026 at 19:50):

Is there a simpler way?

import Mathlib

example (i j : Multiplicative ) : i * j = (0 : ) := by
  rw [show i * j = (Multiplicative.toAdd i) + Multiplicative.toAdd j from rfl]
  set i :  := i
  set j :  := j
  unfold Multiplicative.toAdd
  unfold Multiplicative.ofAdd
  simp
  clear_value i j
  clear * -
  guard_hyp i : 
  guard_hyp j : 
  guard_target = i + j = 0

Ruben Van de Velde (Jan 06 2026 at 19:58):

import Mathlib

example (i j : Multiplicative ) : i * j = 1 := by
  induction i with | ofAdd i =>
  induction j with | ofAdd j =>
  rw [ ofAdd_add, ofAdd_eq_one]
  guard_hyp i : 
  guard_hyp j : 
  guard_target = i + j = 0
  sorry

Ruben Van de Velde (Jan 06 2026 at 20:00):

(Why isn't docs#ofAdd_add namespaced?)

Jakub Nowak (Jan 06 2026 at 20:17):

With more complicated expression it's pretty hard to push Multiplicative.ofAdd. For example here's my code:

import Mathlib

variable {T : } (hT : T  0)

def intToFundamentalGroupAddCircle : Multiplicative  →ₙ* FundamentalGroup (AddCircle T) 0 where
  toFun (i : ) := .mk {
      toFun x := ((i : ) * T) * (x : )
      source' := by simp
      target' := by
        simp
        rw [AddCircle.coe_period]
        simp
    }
  map_mul' i j := by
    cases i with | ofAdd i =>
    cases j with | ofAdd j =>
    rw [ ofAdd_add]
    -- ???

Aaron Liu (Jan 06 2026 at 20:18):

you're commiting defeq abuse

Jakub Nowak (Jan 06 2026 at 20:19):

Is there a way to have a homeomorphism from AddGroup to Group to avoid this?

Jakub Nowak (Jan 06 2026 at 20:20):

Or I could try to use Additive (FundamentalGroup (AddCircle T) 0) instead.

Aaron Liu (Jan 06 2026 at 20:22):

try this instead

import Mathlib

variable {T : } (hT : T  0)

def intToFundamentalGroupAddCircle : Multiplicative  →ₙ* FundamentalGroup (AddCircle T) 0 where
  toFun i := .mk {
      toFun x := ((Int.cast (Multiplicative.toAdd i : )) * T) * (x : )
      source' := by simp
      target' := by
        simp
        rw [AddCircle.coe_period]
        simp
    }
  map_mul' i j := by
    cases i with | ofAdd i =>
    cases j with | ofAdd j =>
    rw [ ofAdd_add, toAdd_ofAdd, toAdd_ofAdd, toAdd_ofAdd]
    -- I don't know the proof so you'll have to continue from here
    /-
    T : ℝ
    hT : T ≠ 0
    i j : ℤ
    ⊢ Path.Homotopic.Quotient.mk
        { toFun := fun x => ↑(↑(i + j) * T * ↑x), continuous_toFun := ⋯, source' := ⋯, target' := ⋯ } =
      Path.Homotopic.Quotient.mk { toFun := fun x => ↑(↑i * T * ↑x), continuous_toFun := ⋯, source' := ⋯, target' := ⋯ } *
        Path.Homotopic.Quotient.mk { toFun := fun x => ↑(↑j * T * ↑x), continuous_toFun := ⋯, source' := ⋯, target' := ⋯ }
    -/
    sorry

Jakub Nowak (Jan 06 2026 at 20:29):

Thanks! Looks like simp also works instead of manual rw there.


Last updated: Feb 28 2026 at 14:05 UTC