Zulip Chat Archive

Stream: new members

Topic: Mechanics of Proof 1.4.4


JK (Aug 04 2025 at 16:11):

I'm stuck on why the following is not a complete proof, and how to complete it (note the only interesting bit is in the final line):

example {u v x y A B : } (h1 : 0 < A) (h2 : A  1) (h3 : 1  B) (h4 : x  B)
    (h5 : y  B) (h6 : 0  u) (h7 : 0  v) (h8 : u < A) (h9 : v < A) :
    u * y + v * x + u * v < 3 * A * B :=
  calc
    u * y + v * x + u * v
       u * B + v * B + u * v := by rel [h5, h4]
    _  A * B + A * B + A * v := by rel [h8, h9]
    _  A * B + A * B + 1 * v := by rel [h2]
    _  A * B + A * B + B * v := by rel [h3]
    _ < A * B + A * B + B * A := by rel [h9]
    _ = 3 * A * B := by ring

Kenny Lau (Aug 04 2025 at 16:22):

Please use 3 #backticks in a newline before and after the codeblock and include enough imports to make it an #mwe

Kenny Lau (Aug 04 2025 at 16:23):

what do you mean by not a complete proof? what does the error message say?

JK (Aug 04 2025 at 16:27):

I don't get an error, but I also don't get checkmarks by the result

Aaron Liu (Aug 04 2025 at 16:31):

What happens when you change the example to a theorem foo?

JK (Aug 04 2025 at 16:31):

Still doesn't verify

JK (Aug 04 2025 at 16:51):

OK, the proof does verify; I didn't get checkmarks because the linter was warning me that h1 was not being used. When I added

set_option linter.unusedVariables false

beforehand, I saw the expected checkmarks

Kenny Lau (Aug 04 2025 at 17:35):

who would have known we don't need h1 (really??)

Kenny Lau (Aug 04 2025 at 17:35):

oh, right, we don't need h1 because it's implied by h6 and h8

Kenny Lau (Aug 04 2025 at 17:36):

(as well as h7 + h9, and the HoTT people can comment on whether these two proofs are the same)


Last updated: Dec 20 2025 at 21:32 UTC