dataprop isPythTrip (int, int, int) =
| {a,b,c:nat | aa + bb == c*c} Trip(a, b, c)
| {a,b,c:int} NotTrip(a, b, c)
// Write prfun to take 3 integers (a, b, c) and return
// a proof that a^2 + b^2 = c^2 (or not)
prfn
is_trip {l, m, n: int} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip(l, m, n)
else NotTrip(l,m,n)
The highlighted symbols no longer see to refer to the static variables. I’m
probably doing several things wrong here; my main objective is to get a
feel for creating proofs for certain states (conditions).
On Saturday, November 1, 2014 1:57:43 PM UTC-4, gmhwxi wrote:
This is the right way to do what you wanted:
prfn
is_trip {l, m, n: nat} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip{l,m,n}() else NotTrip{l,m,n}()
On Saturday, November 1, 2014 11:54:09 AM UTC-4, Brandon Barker wrote:
dataprop isPythTrip (int, int, int) =
| {a,b,c:nat | aa + bb == c*c} Trip(a, b, c)
| {a,b,c:int} NotTrip(a, b, c)
// Write prfun to take 3 integers (a, b, c) and return
// a proof that a^2 + b^2 = c^2 (or not)
prfn
is_trip {l, m, n: int} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip(l, m, n)
else NotTrip(l,m,n)
The highlighted symbols no longer see to refer to the static variables.
I’m probably doing several things wrong here; my main objective is to get a
feel for creating proofs for certain states (conditions).
prfn
is_trip {l, m, n: nat} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip{l,m,n}() else NotTrip{l,m,n}()
On Saturday, November 1, 2014 11:54:09 AM UTC-4, Brandon Barker wrote:
dataprop isPythTrip (int, int, int) =
| {a,b,c:nat | aa + bb == c*c} Trip(a, b, c)
| {a,b,c:int} NotTrip(a, b, c)
// Write prfun to take 3 integers (a, b, c) and return
// a proof that a^2 + b^2 = c^2 (or not)
prfn
is_trip {l, m, n: int} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip(l, m, n)
else NotTrip(l,m,n)
The highlighted symbols no longer see to refer to the static variables.
I’m probably doing several things wrong here; my main objective is to get a
feel for creating proofs for certain states (conditions).
prfn
is_trip {l, m, n: nat} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip{l,m,n}() else NotTrip{l,m,n}()On Saturday, November 1, 2014 11:54:09 AM UTC-4, Brandon Barker wrote:
dataprop isPythTrip (int, int, int) =
| {a,b,c:nat | aa + bb == c*c} Trip(a, b, c)
| {a,b,c:int} NotTrip(a, b, c)
// Write prfun to take 3 integers (a, b, c) and return
// a proof that a^2 + b^2 = c^2 (or not)
prfn
is_trip {l, m, n: int} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip(l, m, n)
else NotTrip(l,m,n)
The highlighted symbols no longer see to refer to the static variables.
I’m probably doing several things wrong here; my main objective is to get a
feel for creating proofs for certain states (conditions).
One issue with the below code is that I’m not using linear functions over
static variables, but quadratic, so I don’t think this version will really
work in the end.On Saturday, November 1, 2014 11:54:09 AM UTC-4, Brandon Barker wrote:
dataprop isPythTrip (int, int, int) =
| {a,b,c:nat | aa + bb == c*c} Trip(a, b, c)
| {a,b,c:int} NotTrip(a, b, c)
// Write prfun to take 3 integers (a, b, c) and return
// a proof that a^2 + b^2 = c^2 (or not)
prfn
is_trip {l, m, n: int} (): isPythTrip(l, m, n) =
sif ll + mm == n*n then Trip(l, m, n)
else NotTrip(l,m,n)
The highlighted symbols no longer see to refer to the static variables.
I’m probably doing several things wrong here; my main objective is to get a
feel for creating proofs for certain states (conditions).