pith. machine review for the scientific record. sign in
def definition def or abbrev

neg

show as:
view Lean formalization →

No prose has been written for this declaration yet. The Lean source and graph data below render without it.

generate prose now

formal statement (Lean)

 128def neg : LogicRat → LogicRat :=

proof body

Definition body.

 129  Quotient.lift
 130    (fun (p : PreRat) => mk (-p.num) p.den p.den_nonzero)
 131    (by
 132      rintro ⟨a, b, hb⟩ ⟨c, d, hd⟩ h
 133      show mk (-a) b hb = mk (-c) d hd
 134      apply sound
 135      show -a * d = -c * b
 136      have h' : a * d = c * b := h
 137      rw [eq_iff_toInt_eq, toInt_mul, toInt_mul, toInt_neg, toInt_neg]
 138      have h'' : toInt a * toInt d = toInt c * toInt b := by
 139        have := congrArg toInt h'
 140        rwa [toInt_mul, toInt_mul] at this
 141      linarith)
 142
 143instance : Neg LogicRat := ⟨neg⟩
 144
 145/-- Addition: `(a/b) + (c/d) = (a*d + c*b) / (b*d)`. -/

used by (40)

From the project-wide theorem graph. These declarations reference this one in their body.

… and 10 more

depends on (14)

Lean names referenced from this declaration's body.