Guest User

Untitled

a guest
May 26th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Theorem plus_id_exercise : ∀ n m o : nat,
  2. n = m → m = o → n + m = m + o.
  3. Proof.
  4. (* FILL IN HERE *) Admitted.
  5.  
  6. plusIdExercise : (n : Nat) ->
  7. (m : Nat) ->
  8. (o : Nat) ->
  9. (n == m) = True ->
  10. (m == o) = True ->
  11. (n + m == m + o) = True
  12.  
  13. plusIdExercise Z Z Z n_eq_m n_eq_o = Refl
  14.  
  15. plusIdExercise (S n) Z Z n_eq_m n_eq_o = absurd
  16.  
  17. When checking right hand side of plusIdExercise with expected type
  18. S n + 0 == 0 + 0 = True
  19.  
  20. Type mismatch between
  21. t -> a (Type of absurd)
  22. and
  23. False = True (Expected type)
  24.  
  25. Specifically:
  26. Type mismatch between
  27. uv => t -> uv
  28. and
  29. (=) FalseUnification failure
Add Comment
Please, Sign In to add comment