Skip to content

Commit

Permalink
Return to non-incremental validation in numerical abduction. Map-base…
Browse files Browse the repository at this point in the history
…d numerical substitutions and normal form inequalities.
  • Loading branch information
lukstafi committed Mar 18, 2015
1 parent d3800e9 commit a9bba32
Show file tree
Hide file tree
Showing 64 changed files with 602 additions and 599 deletions.
12 changes: 6 additions & 6 deletions examples/avl_tree.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ external val compare : ∀a. a → a → LinOrder
val height : ∀n, a. Avl (a, n) → Num n

val create :
∀k, n, a[0 ≤ n ∧ n ≤ k + 2 ∧ 0 ≤ k ∧ kn + 2].
∀k, n, a[k ≤ n + 2 ∧ 0 ≤ k ∧ nk + 2 ∧ 0 ≤ n].
Avl (a, k) → a → Avl (a, n) → ∃i[i=max (k + 1, n + 1)].Avl (a, i)

val singleton : ∀a. a → Avl (a, 1)

val rotr :
∀k, n, a[0 ≤ n ∧ n + 2 ≤ k ∧ k ≤ n + 3].
∀k, n, a[k ≤ n + 3 ∧ n + 2 ≤ k ∧ 0 ≤ n].
Avl (a, k) → a → Avl (a, n) → ∃n[k ≤ n ∧
n ≤ k + 1].Avl (a, n)

val rotl :
∀k, n, a[n ≤ k + 3 ∧ 0 ≤ k ∧ k + 2 ≤ n].
∀k, n, a[k + 2 ≤ n ∧ 0 ≤ k ∧ n ≤ k + 3].
Avl (a, k) → a → Avl (a, n) → ∃k[k ≤ n + 1 ∧
n ≤ k].Avl (a, k)

Expand All @@ -46,13 +46,13 @@ val min_binding : ∀n, a[1 ≤ n]. Avl (a, n) → a

val remove_min_binding :
∀n, a[1 ≤ n].
Avl (a, n) → ∃k[n ≤ k + 1 ∧ k + 2 ≤ 2 n ∧ k ≤ n].Avl (a, k)
Avl (a, n) → ∃k[k + 2 ≤ 2 n ∧ k ≤ n ∧ n ≤ k + 1].Avl (a, k)

val merge :
∀k, n, a[nk + 2 ∧ kn + 2].
∀k, n, a[kn + 2 ∧ nk + 2].
(Avl (a, n), Avl (a, k)) → ∃i[n ≤ i ∧ k ≤ i ∧ i ≤ n + k ∧
i≤max (k + 1, n + 1)].Avl (a, i)

val remove :
∀n, a.
a → Avl (a, n) → ∃k[n ≤ k + 1 ∧ 0kkn].Avl (a, k)
a → Avl (a, n) → ∃k[n ≤ k + 1 ∧ kn0k].Avl (a, k)
4 changes: 2 additions & 2 deletions examples/binary_upper_bound.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ datacons POne : ∀n[0 ≤ n].Binary n ⟶ Binary (2 n + 1)

val ub :
∀k, n.
Binary k → Binary n → ∃i[ki ∧ n ≤ i ∧
in + k].Binary i
Binary k → Binary n → ∃i[in + k ∧ n ≤ i ∧
ki].Binary i
2 changes: 1 addition & 1 deletion examples/filter.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ datacons LCons : ∀n, a[0 ≤ n].a * List (a, n) ⟶ List (a, n + 1)

val filter :
∀n, a.
(a → Bool) → List (a, n) → ∃k[0kkn].List (a, k)
(a → Bool) → List (a, n) → ∃k[kn0k].List (a, k)
4 changes: 2 additions & 2 deletions examples/filter_map.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ datacons LCons : ∀n, a[0 ≤ n].a * List (a, n) ⟶ List (a, n + 1)

val filter :
∀n, a, b.
(a → Bool) → (a → b) → List (a, n) → ∃k[0k
kn].List (b, k)
(a → Bool) → (a → b) → List (a, n) → ∃k[kn
0k].List (b, k)
2 changes: 1 addition & 1 deletion examples/liquid_bcopy.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ external val prod : Int → Int → Int
external val int0 : Int

val bcopy_aux :
∀i, j, k, n, a[0n ∧ k ≤ i ∧ kj].
∀i, j, k, n, a[kj ∧ k ≤ i ∧ 0n].
Array (a, j) → Array (a, i) → (Num n, Num k) → ()

val bcopy : ∀k, n, a[k ≤ n]. Array (a, k) → Array (a, n) → ()
2 changes: 1 addition & 1 deletion examples/liquid_bcopy_simpler.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ external val prod : Int → Int → Int
external val int0 : Int

val bcopy_aux :
∀i, j, k, n, a[0n ∧ k ≤ i ∧ kj].
∀i, j, k, n, a[kj ∧ k ≤ i ∧ 0n].
Array (a, j) → Array (a, i) → (Num n, Num k) → ()

val bcopy : ∀k, n, a[k ≤ n]. Array (a, k) → Array (a, n) → ()
2 changes: 1 addition & 1 deletion examples/liquid_bsearch.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ datacons NotFound : ∀a. Answer a
datacons Found : ∀a.a ⟶ Answer a

val look :
∀i, k, n, a[0 ≤ k ∧ n + 1 ≤ i].
∀i, k, n, a[n + 1 ≤ i ∧ 0 ≤ k].
a → Array (a, i) → Num k → Num n → Answer a

val bsearch : ∀n, a[0 ≤ n]. a → Array (a, n) → Answer a
8 changes: 4 additions & 4 deletions examples/liquid_bsearch2.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ external val equal : ∀a. a → a → Bool
external val div2 : ∀n. Num (2 n) → Num n

val look :
∀i, k, n, a[0 ≤ n + 1 ∧ 0 ≤ k ∧ n + 1 ≤ i].
a → Array (a, i) → Num k → Num n → ∃k[0k + 1
kn].Num k
∀i, k, n, a[n + 1 ≤ i ∧ 0 ≤ k ∧ 0 ≤ n + 1].
a → Array (a, i) → Num k → Num n → ∃k[kn
0k + 1].Num k

val bsearch :
∀n, a[0 ≤ n + 1].
a → Array (a, n + 1) → ∃k[0k + 1 ∧ k ≤ n].Num k
a → Array (a, n + 1) → ∃k[kn ∧ 0 ≤ k + 1].Num k
8 changes: 4 additions & 4 deletions examples/liquid_bsearch2_harder1.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ external val equal : ∀a. a → a → Bool
external val div2 : ∀n. Num (2 n) → Num n

val look :
∀i, k, n, a[0 ≤ n + 1 ∧ 0 ≤ k ∧ n + 1 ≤ i].
a → Array (a, i) → Num k → Num n → ∃k[0k + 1
kn].Num k
∀i, k, n, a[n + 1 ≤ i ∧ 0 ≤ k ∧ 0 ≤ n + 1].
a → Array (a, i) → Num k → Num n → ∃k[kn
0k + 1].Num k

val bsearch :
∀n, a[0 ≤ n + 1].
a → Array (a, n + 1) → ∃k[0k + 1 ∧ k ≤ n].Num k
a → Array (a, n + 1) → ∃k[kn ∧ 0 ≤ k + 1].Num k
2 changes: 1 addition & 1 deletion examples/liquid_bsearch2_harder2.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ external val div2 : ∀n. Num (2 n) → Num n

val bsearch :
∀n, a[0 ≤ n + 1].
a → Array (a, n + 1) → ∃k[0k + 1 ∧ k ≤ n].Num k
a → Array (a, n + 1) → ∃k[kn ∧ 0 ≤ k + 1].Num k
2 changes: 1 addition & 1 deletion examples/liquid_bsearch2_harder3.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ external val div2 : ∀n. Num (2 n) → Num n

val bsearch :
∀n, a[0 ≤ n].
a → Array (a, n) → ∃k[0 ≤ k + 1 k + 1 ≤ n].Num k
a → Array (a, n) → ∃k[k + 1 ≤ n ∧ 0 ≤ k + 1].Num k
8 changes: 4 additions & 4 deletions examples/liquid_bsearch2_harder3.ml.target
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ let compare : ('a -> 'a -> linOrder) =
let equal : ('a -> 'a -> bool) = fun a b -> a = b
let div2 : ((* 2 n *) num -> (* n *) num) = fun x -> x / 2
type ex4 =
| Ex4 : (*∀'k, 'n[0 ≤ k + 1 k + 1 ≤ n].*)(* k *) num ->
| Ex4 : (*∀'k, 'n[k + 1 ≤ n ∧ 0 ≤ k + 1].*)(* k *) num ->
(* n *) ex4
type ex3 =
| Ex3 : (*∀'k, 'n[0k + 1 ∧ k ≤ n].*)(* k *) num -> (* n *) ex3
| Ex3 : (*∀'k, 'n[kn ∧ 0 ≤ k + 1].*)(* k *) num -> (* n *) ex3
let bsearch
: type (*n*) a (*0 ≤ n*). (a -> (a (* n *)) array -> (* n *) ex4) =
(fun key vec ->
let Ex3 xcase =
let rec look :
type (*i*) (*j*) (*k*) b (*0 ≤ k + 1 ∧ 0 ≤ i ∧
k + 1 ≤ j*). (b -> (b (* j *)) array -> (* i *) num -> (* k *) num ->
type (*i*) (*j*) (*k*) b (*k + 1 ≤ j ∧ 0 ≤ i ∧
0 ≤ k + 1*). (b -> (b (* j *)) array -> (* i *) num -> (* k *) num ->
(* k *) ex3)
=
(fun key vec lo hi ->
Expand Down
6 changes: 3 additions & 3 deletions examples/liquid_bsearch2_simpler.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ external val equal : ∀a. a → a → Bool
external val div2 : ∀n. Num (2 n) → Num n

val look :
∀i, k, n, a[0 ≤ k ∧ k ≤ n + 1 ∧ n + 1 ≤ i].
a → Array (a, i) → Num k → Num n → ∃k[0k + 1
kn].Num k
∀i, k, n, a[n + 1 ≤ i ∧ k ≤ n + 1 ∧ 0 ≤ k].
a → Array (a, i) → Num k → Num n → ∃k[kn
0k + 1].Num k
2 changes: 1 addition & 1 deletion examples/liquid_fft.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ external val asgn : ∀a. Ref a → a → ()
external val deref : ∀a. Ref a → a

val fft :
∀k, n[1 ≤ nn + 1 ≤ k].
∀k, n[n + 1 ≤ k ∧ 1 ≤ n].
Array (Float, n + 1) → Array (Float, k) → Num n
2 changes: 1 addition & 1 deletion examples/liquid_fft_ffor.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ datatype Bounded : num * num
datacons Index : ∀i, k, n[n ≤ i ∧ i ≤ k].Num i ⟶ Bounded (n, k)

val ffor :
∀i, j, k, n[jikn].
∀i, j, k, n[knji].
Num n → Num j → (Bounded (k, i) → ()) → ()
4 changes: 2 additions & 2 deletions examples/liquid_fft_full.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ datatype Bounded : num * num
datacons Index : ∀i, k, n[n ≤ i ∧ i ≤ k].Num i ⟶ Bounded (n, k)

val ffor :
∀i, j, k, n[jikn].
∀i, j, k, n[knji].
Num n → Num j → (Bounded (k, i) → ()) → ()

external val ref : ∀a. a → Ref a
Expand All @@ -73,7 +73,7 @@ external val asgn : ∀a. Ref a → a → ()
external val deref : ∀a. Ref a → a

val fft :
∀k, n[1 ≤ nn + 1 ≤ k].
∀k, n[n + 1 ≤ k ∧ 1 ≤ n].
Array (Float, n + 1) → Array (Float, k) → Num n

val ffttest : ∀n[2 ≤ n]. Num n → Float
Expand Down
2 changes: 1 addition & 1 deletion examples/liquid_fft_full_asserted.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ datatype Bounded : num * num
datacons Index : ∀i, k, n[n ≤ i ∧ i ≤ k].Num i ⟶ Bounded (n, k)

val ffor :
∀i, j, k, n[jikn].
∀i, j, k, n[knji].
Num n → Num j → (Bounded (k, i) → ()) → ()

external val ref : ∀a. a → Ref a
Expand Down
14 changes: 7 additions & 7 deletions examples/liquid_gauss.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ external val fl0 : Float
external val fl1 : Float

val getRow :
∀i, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i].
∀i, k, n[k + 1 ≤ i ∧ 0 ≤ k ∧ 0 ≤ n].
Matrix (i, n) → Num k → Array (Float, n)

val putRow :
∀i, j, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i ∧ nj].
∀i, j, k, n[n ≤ j ∧ k + 1 ≤ i ∧ 0k ∧ 0 ≤ n].
Matrix (i, j) → Num k → Array (Float, n) → ()

val rowSwap :
∀i, j, k, n[0 ≤ n0 ≤ k ∧ k + 1 ≤ i ∧ n + 1 ≤ i
0 ≤ j]. Matrix (i, j) → Num k → Num n → ()
∀i, j, k, n[0 ≤ jn + 1 ≤ i ∧ k + 1 ≤ i ∧ 0 ≤ k
0 ≤ n]. Matrix (i, j) → Num k → Num n → ()

val norm :
∀i, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i].
∀i, k, n[n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, i) → Num k → Num n → ()

val rowElim :
∀i, j, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i ∧ k ≤ j].
∀i, j, k, n[k ≤ j ∧ n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()

val gauss : ∀k, n[0 ≤ n ∧ n ≤ k ∧ 1 ≤ k]. Matrix (n, k) → ()
val gauss : ∀k, n[n ≤ k ∧ 1 ≤ n]. Matrix (n, k) → ()
14 changes: 7 additions & 7 deletions examples/liquid_gauss2.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ external val fl0 : Float
external val fl1 : Float

val getRow :
∀i, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i].
∀i, k, n[k + 1 ≤ i ∧ 0 ≤ k ∧ 0 ≤ n].
Matrix (i, n) → Num k → Array (Float, n)

val putRow :
∀i, j, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i ∧ nj].
∀i, j, k, n[n ≤ j ∧ k + 1 ≤ i ∧ 0k ∧ 0 ≤ n].
Matrix (i, j) → Num k → Array (Float, n) → ()

val rowSwap :
∀i, j, k, n[0 ≤ n0 ≤ k ∧ k + 1 ≤ i ∧ n + 1 ≤ i
0 ≤ j]. Matrix (i, j) → Num k → Num n → ()
∀i, j, k, n[0 ≤ jn + 1 ≤ i ∧ k + 1 ≤ i ∧ 0 ≤ k
0 ≤ n]. Matrix (i, j) → Num k → Num n → ()

val norm :
∀i, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i].
∀i, k, n[n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, i) → Num k → Num n → ()

val rowElim :
∀i, j, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i ∧ k ≤ j].
∀i, j, k, n[k ≤ j ∧ n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()

val gauss : ∀k, n[1 ≤ nn + 1 ≤ k]. Matrix (n, k) → ()
val gauss : ∀k, n[n + 1 ≤ k ∧ 1 ≤ n]. Matrix (n, k) → ()
12 changes: 6 additions & 6 deletions examples/liquid_gauss_asserted.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ external val fl0 : Float
external val fl1 : Float

val getRow :
∀i, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i].
∀i, k, n[k + 1 ≤ i ∧ 0 ≤ k ∧ 0 ≤ n].
Matrix (i, n) → Num k → Array (Float, n)

val putRow :
∀i, j, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i ∧ nj].
∀i, j, k, n[n ≤ j ∧ k + 1 ≤ i ∧ 0k ∧ 0 ≤ n].
Matrix (i, j) → Num k → Array (Float, n) → ()

val rowSwap :
∀i, j, k, n[0 ≤ n0 ≤ k ∧ k + 1 ≤ i ∧ n + 1 ≤ i
0 ≤ j]. Matrix (i, j) → Num k → Num n → ()
∀i, j, k, n[0 ≤ jn + 1 ≤ i ∧ k + 1 ≤ i ∧ 0 ≤ k
0 ≤ n]. Matrix (i, j) → Num k → Num n → ()

val norm :
∀i, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i].
∀i, k, n[n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, i) → Num k → Num n → ()

val rowElim :
∀i, j, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i ∧ k ≤ j].
∀i, j, k, n[k ≤ j ∧ n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()

val gauss : ∀n[1 ≤ n]. Matrix (n, n + 1) → ()
14 changes: 7 additions & 7 deletions examples/liquid_gauss_harder_asserted.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ external val fl0 : Float
external val fl1 : Float

val getRow :
∀i, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i].
∀i, k, n[k + 1 ≤ i ∧ 0 ≤ k ∧ 0 ≤ n].
Matrix (i, n) → Num k → Array (Float, n)

val putRow :
∀i, j, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i ∧ nj].
∀i, j, k, n[n ≤ j ∧ k + 1 ≤ i ∧ 0k ∧ 0 ≤ n].
Matrix (i, j) → Num k → Array (Float, n) → ()

val rowSwap :
∀i, j, k, n[0 ≤ n0 ≤ k ∧ k + 1 ≤ i ∧ n + 1 ≤ i
0 ≤ j]. Matrix (i, j) → Num k → Num n → ()
∀i, j, k, n[0 ≤ jn + 1 ≤ i ∧ k + 1 ≤ i ∧ 0 ≤ k
0 ≤ n]. Matrix (i, j) → Num k → Num n → ()

val norm :
∀i, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i].
∀i, k, n[n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, i) → Num k → Num n → ()

val rowElim :
∀i, j, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i ∧ k ≤ j].
∀i, j, k, n[k ≤ j ∧ n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()

val gauss : ∀k, n[1 ≤ nn + 1 ≤ k]. Matrix (n, k) → ()
val gauss : ∀k, n[n + 1 ≤ k ∧ 1 ≤ n]. Matrix (n, k) → ()
2 changes: 1 addition & 1 deletion examples/liquid_gauss_rowElim.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ external val fl0 : Float
external val fl1 : Float

val rowElim :
∀i, j, k, n[0 ≤ n ∧ k ≤ i ∧ n + 1 ≤ i ∧ k ≤ j].
∀i, j, k, n[k ≤ j ∧ n + 1 ≤ i ∧ k ≤ i ∧ 0 ≤ n].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()
4 changes: 2 additions & 2 deletions examples/liquid_gauss_rowMax_2.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ external norm :
Array (Float, i) → Num k → Num n → ()

val rowMax :
∀i, j, k, m, n[0 ≤ ii + 1 ≤ j ∧ i + 1 ≤ m ∧ 0 ≤ k
0 ≤ n].
∀i, j, k, m, n[0 ≤ n0 ≤ k ∧ i + 1 ≤ m ∧ i + 1 ≤ j
0 ≤ i].
Matrix (j, m) → Num i →
(Num k → Float → Num n → ∃k[0 ≤ k ∧
k≤max (n, j + -1)].Num k,
Expand Down
4 changes: 2 additions & 2 deletions examples/liquid_gauss_rowSwap.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ external putRow :
Matrix (n, k) → Num i → Array (Float, j) → ()

val rowSwap :
∀i, j, k, n[0 ≤ n0 ≤ k ∧ k + 1 ≤ i ∧ n + 1 ≤ i
0 ≤ j]. Matrix (i, j) → Num k → Num n → ()
∀i, j, k, n[0 ≤ jn + 1 ≤ i ∧ k + 1 ≤ i ∧ 0 ≤ k
0 ≤ n]. Matrix (i, j) → Num k → Num n → ()
2 changes: 1 addition & 1 deletion examples/liquid_gauss_simpler.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ external rowElim :
∀i, j, k, n[0 ≤ n ∧ n + 1 ≤ i ∧ k ≤ i ∧ k ≤ j].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()

val gauss : ∀k, n[0 ≤ n ∧ n + 1 ≤ k]. Matrix (n, k) → ()
val gauss : ∀k, n[n + 1 ≤ k ∧ 0 ≤ n]. Matrix (n, k) → ()
2 changes: 1 addition & 1 deletion examples/liquid_gauss_simpler_asserted.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ external rowElim :
∀i, j, k, n[0 ≤ n ∧ n + 1 ≤ i ∧ k ≤ i ∧ k ≤ j].
Array (Float, j) → Array (Float, i) → Num k → Num n → ()

val gauss : ∀n[1 ≤ n]. Matrix (n, n + 1) → ()
val gauss : ∀n[0 ≤ n]. Matrix (n, n + 1) → ()
6 changes: 3 additions & 3 deletions examples/liquid_heapsort.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ external val plus : Int → Int → Int
external val int0 : Int

val heapify :
∀i, k, n, a[0nik].
∀i, k, n, a[ik0n].
Num i → Array (a, k) → Num n → ()

val buildheap : ∀k, n, a[k ≤ n]. Num k → Array (a, n) → ()

val heapsort :
∀i, k, n, a[knik].
∀i, k, n, a[ikkn].
Num i → Num k → Array (a, n) → ()

val print_array :
∀i, k, n[ki0n].
∀i, k, n[0nki].
Array (String, i) → Num n → Num k → ()
2 changes: 1 addition & 1 deletion examples/liquid_heapsort_heapify.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ external val plus : Int → Int → Int
external val int0 : Int

val heapify :
∀i, k, n, a[0nik].
∀i, k, n, a[ik0n].
Num i → Array (a, k) → Num n → ()
2 changes: 1 addition & 1 deletion examples/liquid_heapsort_heapify_simpler.gadti.target
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ external val plus : Int → Int → Int
external val int0 : Int

val heapify :
∀i, k, n, a[0n ∧ n + 1 ≤ i ∧ ik].
∀i, k, n, a[ik ∧ n + 1 ≤ i ∧ 0n].
Num i → Array (a, k) → Num n → ()
Loading

0 comments on commit a9bba32

Please sign in to comment.