-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Aegis.Commands | ||
|
||
open Sierra | ||
|
||
aegis_load_file "../../e2e_libfuncs/u8_aegis/u8_try_from_felt252.sierra" | ||
|
||
aegis_spec "test::foo" := | ||
fun _ _ a _ ρ => | ||
a.val < U8_MOD ∧ ρ = .inl a.cast | ||
∨ U8_MOD ≤ a.val ∧ ρ = .inr () | ||
|
||
aegis_prove "test::foo" := | ||
fun _ _ a _ ρ => by | ||
unfold «spec_test::foo» | ||
rename_i x x_1 x_2 | ||
intro h_auto | ||
unhygienic aesop_cases h_auto | ||
· simp_all only [and_self, true_or] | ||
· simp_all only [and_self, or_true] | ||
|
||
aegis_complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Aegis.Commands | ||
|
||
open Sierra | ||
|
||
aegis_load_file "../../e2e_libfuncs/u8_aegis/u8_wide_mul.sierra" | ||
|
||
aegis_spec "test::foo" := | ||
fun _ a b ρ => | ||
ρ = a.cast * b.cast | ||
|
||
aegis_prove "test::foo" := | ||
fun _ a b ρ => by | ||
unfold «spec_test::foo» | ||
rename_i x | ||
intro h_auto | ||
aesop_subst h_auto | ||
simp_all only | ||
|
||
aegis_complete |