Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix creation of Trans instance in calculational proof section #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions quantifiers_and_equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ small example demonstrates how to extend the `calc` notation using new `Trans` i
def divides (x y : Nat) : Prop :=
∃ k, k*x = y

def divides_trans (h₁ : divides x y) (h₂ : divides y z) : divides x z :=
def divides_trans {x y z : Nat} (h₁ : divides x y) (h₂ : divides y z) : divides x z :=
let ⟨k₁, d₁⟩ := h₁
let ⟨k₂, d₂⟩ := h₂
⟨k₁ * k₂, by rw [Nat.mul_comm k₁ k₂, Nat.mul_assoc, d₁, d₂]⟩
Expand All @@ -497,7 +497,7 @@ example (h₁ : divides x y) (h₂ : y = z) : divides x (2*z) :=
_ = z := h₂
divides _ (2*z) := divides_mul ..

infix:50 " ∣ " => divides
infix:50 (priority := high) " ∣ " => divides

example (h₁ : divides x y) (h₂ : y = z) : divides x (2*z) :=
calc
Expand Down