summaryrefslogtreecommitdiff
path: root/tests/lean/misc
diff options
context:
space:
mode:
authorSon Ho2023-03-07 17:49:03 +0100
committerSon HO2023-06-04 21:44:33 +0200
commit4db56fe2c963a4052f8415b3985c8765407fccbc (patch)
tree53c5f05469bb3946547c418176f35d840dbe6012 /tests/lean/misc
parent051e2a19f3268d272a0acd0425d2107ebea020c5 (diff)
Update the extraction of Lean files
Diffstat (limited to '')
-rw-r--r--tests/lean/misc-constants/Constants.lean7
-rw-r--r--tests/lean/misc-constants/lake-manifest.json27
-rw-r--r--tests/lean/misc-constants/lakefile.lean14
-rw-r--r--tests/lean/misc-constants/lean-toolchain1
-rw-r--r--tests/lean/misc-external/External.lean1
-rw-r--r--tests/lean/misc-external/External/Types.lean4
-rw-r--r--tests/lean/misc-external/lake-manifest.json27
-rw-r--r--tests/lean/misc-external/lakefile.lean14
-rw-r--r--tests/lean/misc-external/lean-toolchain1
-rw-r--r--tests/lean/misc-loops/Loops.lean1
-rw-r--r--tests/lean/misc-loops/lake-manifest.json27
-rw-r--r--tests/lean/misc-loops/lakefile.lean14
-rw-r--r--tests/lean/misc-loops/lean-toolchain1
-rw-r--r--tests/lean/misc-no_nested_borrows/NoNestedBorrows.lean20
-rw-r--r--tests/lean/misc-no_nested_borrows/lake-manifest.json27
-rw-r--r--tests/lean/misc-no_nested_borrows/lakefile.lean14
-rw-r--r--tests/lean/misc-no_nested_borrows/lean-toolchain1
-rw-r--r--tests/lean/misc-paper/lake-manifest.json27
-rw-r--r--tests/lean/misc-paper/lakefile.lean14
-rw-r--r--tests/lean/misc-paper/lean-toolchain1
-rw-r--r--tests/lean/misc-polonius_list/lake-manifest.json27
-rw-r--r--tests/lean/misc-polonius_list/lakefile.lean14
-rw-r--r--tests/lean/misc-polonius_list/lean-toolchain1
23 files changed, 213 insertions, 72 deletions
diff --git a/tests/lean/misc-constants/Constants.lean b/tests/lean/misc-constants/Constants.lean
index 57f6e403..937a15e5 100644
--- a/tests/lean/misc-constants/Constants.lean
+++ b/tests/lean/misc-constants/Constants.lean
@@ -35,7 +35,9 @@ structure OpaqueDefs where
Result.ret (x, y)
/- [constants::Pair] -/
- structure pair_t (T1 T2 : Type) where pair_x : T1 pair_y : T2
+ structure pair_t (T1 T2 : Type) where
+ pair_x : T1
+ pair_y : T2
/- [constants::mk_pair1] -/
def mk_pair1_fwd (x : UInt32) (y : UInt32) : Result (pair_t UInt32 UInt32) :=
@@ -70,7 +72,8 @@ structure OpaqueDefs where
def p3_c : pair_t UInt32 UInt32 := eval_global p3_body (by simp)
/- [constants::Wrap] -/
- structure wrap_t (T : Type) where wrap_val : T
+ structure wrap_t (T : Type) where
+ wrap_val : T
/- [constants::Wrap::{0}::new] -/
def wrap_new_fwd (T : Type) (val : T) : Result (wrap_t T) :=
diff --git a/tests/lean/misc-constants/lake-manifest.json b/tests/lean/misc-constants/lake-manifest.json
new file mode 100644
index 00000000..57b071ca
--- /dev/null
+++ b/tests/lean/misc-constants/lake-manifest.json
@@ -0,0 +1,27 @@
+{"version": 4,
+ "packagesDir": "./lake-packages",
+ "packages":
+ [{"git":
+ {"url": "https://github.com/leanprover-community/mathlib4.git",
+ "subDir?": null,
+ "rev": "4037792ead804d7bfa8868e2c4684d4223c15ece",
+ "name": "mathlib",
+ "inputRev?": null}},
+ {"git":
+ {"url": "https://github.com/gebner/quote4",
+ "subDir?": null,
+ "rev": "2412c4fdf4a8b689f4467618e5e7b371ae5014aa",
+ "name": "Qq",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/JLimperg/aesop",
+ "subDir?": null,
+ "rev": "7fe9ecd9339b0e1796e89d243b776849c305c690",
+ "name": "aesop",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/leanprover/std4",
+ "subDir?": null,
+ "rev": "24897887905b3a1254b244369f5dd2cf6174b0ee",
+ "name": "std",
+ "inputRev?": "main"}}]}
diff --git a/tests/lean/misc-constants/lakefile.lean b/tests/lean/misc-constants/lakefile.lean
index ed8eebc2..01aacb90 100644
--- a/tests/lean/misc-constants/lakefile.lean
+++ b/tests/lean/misc-constants/lakefile.lean
@@ -4,15 +4,9 @@ open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
-package «constants» {
- -- add package configuration options here
-}
+package «constants» {}
-lean_lib «Base» {
- -- add library configuration options here
-}
-
-lean_lib «Constants» {
- -- add library configuration options here
-}
+lean_lib «Base» {}
+@[default_target]
+lean_lib «Constants» {}
diff --git a/tests/lean/misc-constants/lean-toolchain b/tests/lean/misc-constants/lean-toolchain
new file mode 100644
index 00000000..bbf57f10
--- /dev/null
+++ b/tests/lean/misc-constants/lean-toolchain
@@ -0,0 +1 @@
+leanprover/lean4:nightly-2023-01-21
diff --git a/tests/lean/misc-external/External.lean b/tests/lean/misc-external/External.lean
new file mode 100644
index 00000000..b95db309
--- /dev/null
+++ b/tests/lean/misc-external/External.lean
@@ -0,0 +1 @@
+import External.Funs
diff --git a/tests/lean/misc-external/External/Types.lean b/tests/lean/misc-external/External/Types.lean
index 386832f4..ed1842be 100644
--- a/tests/lean/misc-external/External/Types.lean
+++ b/tests/lean/misc-external/External/Types.lean
@@ -4,5 +4,7 @@ import Base.Primitives
/- [core::num::nonzero::NonZeroU32] -/
axiom core_num_nonzero_non_zero_u32_t : Type
-/- The state type used in the state-error monad -/ axiom State : Type
+
+/- The state type used in the state-error monad -/
+axiom State : Type
diff --git a/tests/lean/misc-external/lake-manifest.json b/tests/lean/misc-external/lake-manifest.json
new file mode 100644
index 00000000..57b071ca
--- /dev/null
+++ b/tests/lean/misc-external/lake-manifest.json
@@ -0,0 +1,27 @@
+{"version": 4,
+ "packagesDir": "./lake-packages",
+ "packages":
+ [{"git":
+ {"url": "https://github.com/leanprover-community/mathlib4.git",
+ "subDir?": null,
+ "rev": "4037792ead804d7bfa8868e2c4684d4223c15ece",
+ "name": "mathlib",
+ "inputRev?": null}},
+ {"git":
+ {"url": "https://github.com/gebner/quote4",
+ "subDir?": null,
+ "rev": "2412c4fdf4a8b689f4467618e5e7b371ae5014aa",
+ "name": "Qq",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/JLimperg/aesop",
+ "subDir?": null,
+ "rev": "7fe9ecd9339b0e1796e89d243b776849c305c690",
+ "name": "aesop",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/leanprover/std4",
+ "subDir?": null,
+ "rev": "24897887905b3a1254b244369f5dd2cf6174b0ee",
+ "name": "std",
+ "inputRev?": "main"}}]}
diff --git a/tests/lean/misc-external/lakefile.lean b/tests/lean/misc-external/lakefile.lean
index b883f4b9..6cc4aae4 100644
--- a/tests/lean/misc-external/lakefile.lean
+++ b/tests/lean/misc-external/lakefile.lean
@@ -4,15 +4,9 @@ open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
-package «external» {
- -- add package configuration options here
-}
+package «external» {}
-lean_lib «Base» {
- -- add library configuration options here
-}
-
-lean_lib «External» {
- -- add library configuration options here
-}
+lean_lib «Base» {}
+@[default_target]
+lean_lib «External» {}
diff --git a/tests/lean/misc-external/lean-toolchain b/tests/lean/misc-external/lean-toolchain
new file mode 100644
index 00000000..bbf57f10
--- /dev/null
+++ b/tests/lean/misc-external/lean-toolchain
@@ -0,0 +1 @@
+leanprover/lean4:nightly-2023-01-21
diff --git a/tests/lean/misc-loops/Loops.lean b/tests/lean/misc-loops/Loops.lean
new file mode 100644
index 00000000..60c73776
--- /dev/null
+++ b/tests/lean/misc-loops/Loops.lean
@@ -0,0 +1 @@
+import Loops.Funs
diff --git a/tests/lean/misc-loops/lake-manifest.json b/tests/lean/misc-loops/lake-manifest.json
new file mode 100644
index 00000000..57b071ca
--- /dev/null
+++ b/tests/lean/misc-loops/lake-manifest.json
@@ -0,0 +1,27 @@
+{"version": 4,
+ "packagesDir": "./lake-packages",
+ "packages":
+ [{"git":
+ {"url": "https://github.com/leanprover-community/mathlib4.git",
+ "subDir?": null,
+ "rev": "4037792ead804d7bfa8868e2c4684d4223c15ece",
+ "name": "mathlib",
+ "inputRev?": null}},
+ {"git":
+ {"url": "https://github.com/gebner/quote4",
+ "subDir?": null,
+ "rev": "2412c4fdf4a8b689f4467618e5e7b371ae5014aa",
+ "name": "Qq",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/JLimperg/aesop",
+ "subDir?": null,
+ "rev": "7fe9ecd9339b0e1796e89d243b776849c305c690",
+ "name": "aesop",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/leanprover/std4",
+ "subDir?": null,
+ "rev": "24897887905b3a1254b244369f5dd2cf6174b0ee",
+ "name": "std",
+ "inputRev?": "main"}}]}
diff --git a/tests/lean/misc-loops/lakefile.lean b/tests/lean/misc-loops/lakefile.lean
index 0d20ba1f..097c0a7d 100644
--- a/tests/lean/misc-loops/lakefile.lean
+++ b/tests/lean/misc-loops/lakefile.lean
@@ -4,15 +4,9 @@ open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
-package «loops» {
- -- add package configuration options here
-}
+package «loops» {}
-lean_lib «Base» {
- -- add library configuration options here
-}
-
-lean_lib «Loops» {
- -- add library configuration options here
-}
+lean_lib «Base» {}
+@[default_target]
+lean_lib «Loops» {}
diff --git a/tests/lean/misc-loops/lean-toolchain b/tests/lean/misc-loops/lean-toolchain
new file mode 100644
index 00000000..bbf57f10
--- /dev/null
+++ b/tests/lean/misc-loops/lean-toolchain
@@ -0,0 +1 @@
+leanprover/lean4:nightly-2023-01-21
diff --git a/tests/lean/misc-no_nested_borrows/NoNestedBorrows.lean b/tests/lean/misc-no_nested_borrows/NoNestedBorrows.lean
index a20ee9fd..cf7783b2 100644
--- a/tests/lean/misc-no_nested_borrows/NoNestedBorrows.lean
+++ b/tests/lean/misc-no_nested_borrows/NoNestedBorrows.lean
@@ -5,7 +5,9 @@ import Base.Primitives
structure OpaqueDefs where
/- [no_nested_borrows::Pair] -/
- structure pair_t (T1 T2 : Type) where pair_x : T1 pair_y : T2
+ structure pair_t (T1 T2 : Type) where
+ pair_x : T1
+ pair_y : T2
/- [no_nested_borrows::List] -/
inductive list_t (T : Type) :=
@@ -13,16 +15,20 @@ structure OpaqueDefs where
| ListNil : list_t T
/- [no_nested_borrows::One] -/
- inductive one_t (T1 : Type) := | OneOne : T1 -> one_t T1
+ inductive one_t (T1 : Type) :=
+ | OneOne : T1 -> one_t T1
/- [no_nested_borrows::EmptyEnum] -/
- inductive empty_enum_t := | EmptyEnumEmpty : empty_enum_t
+ inductive empty_enum_t :=
+ | EmptyEnumEmpty : empty_enum_t
/- [no_nested_borrows::Enum] -/
- inductive enum_t := | EnumVariant1 : enum_t | EnumVariant2 : enum_t
+ inductive enum_t :=
+ | EnumVariant1 : enum_t
+ | EnumVariant2 : enum_t
/- [no_nested_borrows::EmptyStruct] -/
- structure empty_struct_t where
+ structure empty_struct_t where
/- [no_nested_borrows::Sum] -/
inductive sum_t (T1 T2 : Type) :=
@@ -446,10 +452,8 @@ structure OpaqueDefs where
/- [no_nested_borrows::StructWithTuple] -/
structure struct_with_tuple_t (T1 T2 : Type) where
-
struct_with_tuple_p : (T1 × T2)
-
/- [no_nested_borrows::new_tuple1] -/
def new_tuple1_fwd : Result (struct_with_tuple_t UInt32 UInt32) :=
Result.ret
@@ -476,10 +480,8 @@ structure OpaqueDefs where
/- [no_nested_borrows::StructWithPair] -/
structure struct_with_pair_t (T1 T2 : Type) where
-
struct_with_pair_p : pair_t T1 T2
-
/- [no_nested_borrows::new_pair1] -/
def new_pair1_fwd : Result (struct_with_pair_t UInt32 UInt32) :=
Result.ret
diff --git a/tests/lean/misc-no_nested_borrows/lake-manifest.json b/tests/lean/misc-no_nested_borrows/lake-manifest.json
new file mode 100644
index 00000000..57b071ca
--- /dev/null
+++ b/tests/lean/misc-no_nested_borrows/lake-manifest.json
@@ -0,0 +1,27 @@
+{"version": 4,
+ "packagesDir": "./lake-packages",
+ "packages":
+ [{"git":
+ {"url": "https://github.com/leanprover-community/mathlib4.git",
+ "subDir?": null,
+ "rev": "4037792ead804d7bfa8868e2c4684d4223c15ece",
+ "name": "mathlib",
+ "inputRev?": null}},
+ {"git":
+ {"url": "https://github.com/gebner/quote4",
+ "subDir?": null,
+ "rev": "2412c4fdf4a8b689f4467618e5e7b371ae5014aa",
+ "name": "Qq",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/JLimperg/aesop",
+ "subDir?": null,
+ "rev": "7fe9ecd9339b0e1796e89d243b776849c305c690",
+ "name": "aesop",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/leanprover/std4",
+ "subDir?": null,
+ "rev": "24897887905b3a1254b244369f5dd2cf6174b0ee",
+ "name": "std",
+ "inputRev?": "main"}}]}
diff --git a/tests/lean/misc-no_nested_borrows/lakefile.lean b/tests/lean/misc-no_nested_borrows/lakefile.lean
index e4460813..58619110 100644
--- a/tests/lean/misc-no_nested_borrows/lakefile.lean
+++ b/tests/lean/misc-no_nested_borrows/lakefile.lean
@@ -4,15 +4,9 @@ open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
-package «no_nested_borrows» {
- -- add package configuration options here
-}
+package «no_nested_borrows» {}
-lean_lib «Base» {
- -- add library configuration options here
-}
-
-lean_lib «NoNestedBorrows» {
- -- add library configuration options here
-}
+lean_lib «Base» {}
+@[default_target]
+lean_lib «NoNestedBorrows» {}
diff --git a/tests/lean/misc-no_nested_borrows/lean-toolchain b/tests/lean/misc-no_nested_borrows/lean-toolchain
new file mode 100644
index 00000000..bbf57f10
--- /dev/null
+++ b/tests/lean/misc-no_nested_borrows/lean-toolchain
@@ -0,0 +1 @@
+leanprover/lean4:nightly-2023-01-21
diff --git a/tests/lean/misc-paper/lake-manifest.json b/tests/lean/misc-paper/lake-manifest.json
new file mode 100644
index 00000000..57b071ca
--- /dev/null
+++ b/tests/lean/misc-paper/lake-manifest.json
@@ -0,0 +1,27 @@
+{"version": 4,
+ "packagesDir": "./lake-packages",
+ "packages":
+ [{"git":
+ {"url": "https://github.com/leanprover-community/mathlib4.git",
+ "subDir?": null,
+ "rev": "4037792ead804d7bfa8868e2c4684d4223c15ece",
+ "name": "mathlib",
+ "inputRev?": null}},
+ {"git":
+ {"url": "https://github.com/gebner/quote4",
+ "subDir?": null,
+ "rev": "2412c4fdf4a8b689f4467618e5e7b371ae5014aa",
+ "name": "Qq",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/JLimperg/aesop",
+ "subDir?": null,
+ "rev": "7fe9ecd9339b0e1796e89d243b776849c305c690",
+ "name": "aesop",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/leanprover/std4",
+ "subDir?": null,
+ "rev": "24897887905b3a1254b244369f5dd2cf6174b0ee",
+ "name": "std",
+ "inputRev?": "main"}}]}
diff --git a/tests/lean/misc-paper/lakefile.lean b/tests/lean/misc-paper/lakefile.lean
index d8affff8..75d7208e 100644
--- a/tests/lean/misc-paper/lakefile.lean
+++ b/tests/lean/misc-paper/lakefile.lean
@@ -4,15 +4,9 @@ open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
-package «paper» {
- -- add package configuration options here
-}
+package «paper» {}
-lean_lib «Base» {
- -- add library configuration options here
-}
-
-lean_lib «Paper» {
- -- add library configuration options here
-}
+lean_lib «Base» {}
+@[default_target]
+lean_lib «Paper» {}
diff --git a/tests/lean/misc-paper/lean-toolchain b/tests/lean/misc-paper/lean-toolchain
new file mode 100644
index 00000000..bbf57f10
--- /dev/null
+++ b/tests/lean/misc-paper/lean-toolchain
@@ -0,0 +1 @@
+leanprover/lean4:nightly-2023-01-21
diff --git a/tests/lean/misc-polonius_list/lake-manifest.json b/tests/lean/misc-polonius_list/lake-manifest.json
new file mode 100644
index 00000000..57b071ca
--- /dev/null
+++ b/tests/lean/misc-polonius_list/lake-manifest.json
@@ -0,0 +1,27 @@
+{"version": 4,
+ "packagesDir": "./lake-packages",
+ "packages":
+ [{"git":
+ {"url": "https://github.com/leanprover-community/mathlib4.git",
+ "subDir?": null,
+ "rev": "4037792ead804d7bfa8868e2c4684d4223c15ece",
+ "name": "mathlib",
+ "inputRev?": null}},
+ {"git":
+ {"url": "https://github.com/gebner/quote4",
+ "subDir?": null,
+ "rev": "2412c4fdf4a8b689f4467618e5e7b371ae5014aa",
+ "name": "Qq",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/JLimperg/aesop",
+ "subDir?": null,
+ "rev": "7fe9ecd9339b0e1796e89d243b776849c305c690",
+ "name": "aesop",
+ "inputRev?": "master"}},
+ {"git":
+ {"url": "https://github.com/leanprover/std4",
+ "subDir?": null,
+ "rev": "24897887905b3a1254b244369f5dd2cf6174b0ee",
+ "name": "std",
+ "inputRev?": "main"}}]}
diff --git a/tests/lean/misc-polonius_list/lakefile.lean b/tests/lean/misc-polonius_list/lakefile.lean
index f941effc..e89d4259 100644
--- a/tests/lean/misc-polonius_list/lakefile.lean
+++ b/tests/lean/misc-polonius_list/lakefile.lean
@@ -4,15 +4,9 @@ open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
-package «polonius_list» {
- -- add package configuration options here
-}
+package «polonius_list» {}
-lean_lib «Base» {
- -- add library configuration options here
-}
-
-lean_lib «PoloniusList» {
- -- add library configuration options here
-}
+lean_lib «Base» {}
+@[default_target]
+lean_lib «PoloniusList» {}
diff --git a/tests/lean/misc-polonius_list/lean-toolchain b/tests/lean/misc-polonius_list/lean-toolchain
new file mode 100644
index 00000000..bbf57f10
--- /dev/null
+++ b/tests/lean/misc-polonius_list/lean-toolchain
@@ -0,0 +1 @@
+leanprover/lean4:nightly-2023-01-21