Datasets:

Languages:
English
Size:
n<1K
DOI:
Libraries:
License:
evanlohn commited on
Commit
a11d7e2
1 Parent(s): 3ab8080

extra 24 properties from TIP

Browse files
Files changed (1) hide show
  1. codeprops_bench_ps.jsonl +24 -0
codeprops_bench_ps.jsonl CHANGED
@@ -175,3 +175,27 @@
175
  {"full_name": "twon_lt", "prop_defn": "theorem twon_lt (n: Nat): (2*n.succ.succ.succ + 1)/ 3 < n.succ.succ.succ := by sorry", "prop_loc": "LeanSrc/LeanSrc/Sorts.lean:783", "score": 5, "deps": "import Mathlib", "proof_state": "n : \u2115\n\u22a2 (2 * n.succ.succ.succ + 1) / 3 < n.succ.succ.succ", "file_locs": "LeanSrc/LeanSrc/Sorts.lean:789"}
176
  {"full_name": "third_eq_div_3", "prop_defn": "theorem third_eq_div_3 : (x/3) = third x := by sorry", "prop_loc": "LeanSrc/LeanSrc/Sorts.lean:854", "score": 5, "deps": "import Mathlib\n\ndef third : Nat \u2192 Nat\n| 0 => 0\n| 1 => 0\n| 2 => 0\n| n + 3 => 1 + (third n)\n", "proof_state": "x : \u2115\n\u22a2 x / 3 = third x", "file_locs": "LeanSrc/LeanSrc/Sorts.lean:862"}
177
  {"full_name": "twon_lt'", "prop_defn": "theorem twon_lt' (n: Nat): twoThirds (n.succ.succ.succ) < n.succ.succ.succ := by sorry", "prop_loc": "LeanSrc/LeanSrc/Sorts.lean:927", "score": 5, "deps": "import Mathlib\n\ndef twoThirds : Nat \u2192 Nat\n| 0 => 0\n| 1 => 0\n| 2 => 0\n| n + 3 => 2 + (twoThirds n)\n", "proof_state": "n : \u2115\n\u22a2 twoThirds n.succ.succ.succ < n.succ.succ.succ", "file_locs": "LeanSrc/LeanSrc/Sorts.lean:935"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  {"full_name": "twon_lt", "prop_defn": "theorem twon_lt (n: Nat): (2*n.succ.succ.succ + 1)/ 3 < n.succ.succ.succ := by sorry", "prop_loc": "LeanSrc/LeanSrc/Sorts.lean:783", "score": 5, "deps": "import Mathlib", "proof_state": "n : \u2115\n\u22a2 (2 * n.succ.succ.succ + 1) / 3 < n.succ.succ.succ", "file_locs": "LeanSrc/LeanSrc/Sorts.lean:789"}
176
  {"full_name": "third_eq_div_3", "prop_defn": "theorem third_eq_div_3 : (x/3) = third x := by sorry", "prop_loc": "LeanSrc/LeanSrc/Sorts.lean:854", "score": 5, "deps": "import Mathlib\n\ndef third : Nat \u2192 Nat\n| 0 => 0\n| 1 => 0\n| 2 => 0\n| n + 3 => 1 + (third n)\n", "proof_state": "x : \u2115\n\u22a2 x / 3 = third x", "file_locs": "LeanSrc/LeanSrc/Sorts.lean:862"}
177
  {"full_name": "twon_lt'", "prop_defn": "theorem twon_lt' (n: Nat): twoThirds (n.succ.succ.succ) < n.succ.succ.succ := by sorry", "prop_loc": "LeanSrc/LeanSrc/Sorts.lean:927", "score": 5, "deps": "import Mathlib\n\ndef twoThirds : Nat \u2192 Nat\n| 0 => 0\n| 1 => 0\n| 2 => 0\n| n + 3 => 2 + (twoThirds n)\n", "proof_state": "n : \u2115\n\u22a2 twoThirds n.succ.succ.succ < n.succ.succ.succ", "file_locs": "LeanSrc/LeanSrc/Sorts.lean:935"}
178
+ {"full_name": "prop_Select", "prop_defn": "theorem prop_Select (xs: List \u03b1) [DecidableEq \u03b1] :\n List.map Prod.fst (select xs) == xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:372", "score": 5, "deps": "import Mathlib\n\ndef select : List \u03b1 \u2192 List (\u03b1 \u00d7 (List \u03b1))\n | [] => []\n | x :: xs =>\n \u27e8x, xs\u27e9:: List.map (fun (p: \u03b1 \u00d7 (List \u03b1)) => (p.1, x::p.2)) (select xs)\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (List.map Prod.fst (select xs) == xs) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 279], ["LeanSrc/LeanSrc/Properties.lean", 373]]}
179
+ {"full_name": "prop_SelectPermutations", "prop_defn": "theorem prop_SelectPermutations (xs: List \u03b1) [DecidableEq \u03b1] :\n (List.all\n (List.map\n (fun (p: \u03b1 \u00d7 List \u03b1) => isPermutation xs (p.1::p.2))\n (select xs)\n )\n (fun x => x)\n ):= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:376", "score": 5, "deps": "import Mathlib\n\ndef select : List \u03b1 \u2192 List (\u03b1 \u00d7 (List \u03b1))\n | [] => []\n | x :: xs =>\n \u27e8x, xs\u27e9:: List.map (fun (p: \u03b1 \u00d7 (List \u03b1)) => (p.1, x::p.2)) (select xs)\n\n\ndef deleteFirst [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then xs else x::(deleteFirst n xs)\n\n\ndef isPermutation [DecidableEq \u03b1] : List \u03b1 \u2192 List \u03b1 \u2192 Bool\n| [], ys => (ys == [])\n| x::xs, ys => x \u2208 ys && (isPermutation xs (deleteFirst x ys))\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 ((List.map (fun p => isPermutation xs (p.1 :: p.2)) (select xs)).all fun x => x) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 331], ["LeanSrc/LeanSrc/Properties.lean", 383]]}
180
+ {"full_name": "prop_SelectPermutations'", "prop_defn": "theorem prop_SelectPermutations' (xs: List \u03b1) (z: \u03b1) [DecidableEq \u03b1] :\n let n := count z xs\n (List.all\n (List.map\n (fun (p: \u03b1 \u00d7 List \u03b1) => n == (count z (p.1::p.2)))\n (select xs)\n )\n (fun x => x)\n ):= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:386", "score": 5, "deps": "import Mathlib\n\ndef select : List \u03b1 \u2192 List (\u03b1 \u00d7 (List \u03b1))\n | [] => []\n | x :: xs =>\n \u27e8x, xs\u27e9:: List.map (fun (p: \u03b1 \u00d7 (List \u03b1)) => (p.1, x::p.2)) (select xs)\n\n\ndef count [DecidableEq \u03b1]: \u03b1 -> List \u03b1 -> Nat\n | _z, [] => 0\n | z, x::xs => if x==z then (count z xs).succ else count z xs\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\nz : \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 let n := count z xs;\n ((List.map (fun p => n == count z (p.1 :: p.2)) (select xs)).all fun x => x) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 311], ["LeanSrc/LeanSrc/Properties.lean", 394]]}
181
+ {"full_name": "prop_PairUnpair", "prop_defn": "theorem prop_PairUnpair (xs: List \u03b1) [DecidableEq \u03b1] :\n Even (xs.length) \u2192 ((unpair (pairs xs)) == xs):= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:397", "score": 5, "deps": "import Mathlib\n\ndef pairs : List \u03b1 \u2192 List (\u03b1 \u00d7 \u03b1)\n | x::y::xs => (x, y):: (pairs xs)\n | _ => []\n\n\ndef unpair : List (\u03b1 \u00d7 \u03b1) \u2192 List \u03b1\n | [] => []\n | (x, y)::xs => x :: y :: (unpair xs)\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 Even xs.length \u2192 (unpair (pairs xs) == xs) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 287], ["LeanSrc/LeanSrc/Properties.lean", 398]]}
182
+ {"full_name": "prop_PairEvens", "prop_defn": "theorem prop_PairEvens (xs: List \u03b1) [DecidableEq \u03b1] :\n Even (xs.length) \u2192 List.map Prod.fst (pairs xs) == evens xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:401", "score": 5, "deps": "import Mathlib\n\ndef pairs : List \u03b1 \u2192 List (\u03b1 \u00d7 \u03b1)\n | x::y::xs => (x, y):: (pairs xs)\n | _ => []\n\n\nmutual\n def evens : List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(odds xs)\n def odds : List \u03b1 \u2192 List \u03b1\n | [] => []\n | _x::xs => evens xs\nend\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 Even xs.length \u2192 (List.map Prod.fst (pairs xs) == evens xs) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 297], ["LeanSrc/LeanSrc/Properties.lean", 402]]}
183
+ {"full_name": "prop_PairOdds", "prop_defn": "theorem prop_PairOdds (xs: List \u03b1) [DecidableEq \u03b1] :\n List.map Prod.snd (pairs xs) == odds xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:405", "score": 5, "deps": "import Mathlib\n\ndef pairs : List \u03b1 \u2192 List (\u03b1 \u00d7 \u03b1)\n | x::y::xs => (x, y):: (pairs xs)\n | _ => []\n\n\nmutual\n def evens : List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(odds xs)\n def odds : List \u03b1 \u2192 List \u03b1\n | [] => []\n | _x::xs => evens xs\nend\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (List.map Prod.snd (pairs xs) == odds xs) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 297], ["LeanSrc/LeanSrc/Properties.lean", 406]]}
184
+ {"full_name": "prop_interleave", "prop_defn": "theorem prop_interleave (xs: List \u03b1) [DecidableEq \u03b1] :\n interleave (evens xs) (odds xs) == xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:409", "score": 5, "deps": "import Mathlib\n\nmutual\n def evens : List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(odds xs)\n def odds : List \u03b1 \u2192 List \u03b1\n | [] => []\n | _x::xs => evens xs\nend\n\n\ndef interleave : List \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | (x::xs), ys => x :: interleave ys xs\n | [], ys => ys\ntermination_by xs ys => xs.length + ys.length\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (interleave (evens xs) (odds xs) == xs) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 302], ["LeanSrc/LeanSrc/Properties.lean", 410]]}
185
+ {"full_name": "prop_append_inj_1", "prop_defn": "theorem prop_append_inj_1 (xs ys zs: List \u03b1) [DecidableEq \u03b1] :\n (xs ++ zs == ys ++ zs) \u2192 xs == ys:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:414", "score": 3, "deps": "import Mathlib", "proof_state": "\u03b1 : Type u_1\nxs ys zs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (xs ++ zs == ys ++ zs) = true \u2192 (xs == ys) = true", "file_locs": [["LeanSrc/LeanSrc/Properties.lean", 415]]}
186
+ {"full_name": "prop_append_inj_2", "prop_defn": "theorem prop_append_inj_2 (xs ys zs: List \u03b1) [DecidableEq \u03b1] :\n (xs ++ ys == xs ++ zs) \u2192 ys == zs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:418", "score": 3, "deps": "import Mathlib", "proof_state": "\u03b1 : Type u_1\nxs ys zs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (xs ++ ys == xs ++ zs) = true \u2192 (ys == zs) = true", "file_locs": [["LeanSrc/LeanSrc/Properties.lean", 419]]}
187
+ {"full_name": "prop_nub_nub", "prop_defn": "theorem prop_nub_nub (xs: List \u03b1) [DecidableEq \u03b1] :\n nub (nub xs) == nub xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:422", "score": 5, "deps": "import Mathlib\n\ndef nub [DecidableEq \u03b1]: List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(nub (xs.filter (fun y => x != y)))\ntermination_by xs => xs.length\ndecreasing_by\n simp_wf\n rw [Nat.lt_succ]\n exact List.length_filter_le _ xs\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (nub (nub xs) == nub xs) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 322], ["LeanSrc/LeanSrc/Properties.lean", 423]]}
188
+ {"full_name": "prop_elem_nub_l", "prop_defn": "theorem prop_elem_nub_l (x: \u03b1) (xs: List \u03b1) [DecidableEq \u03b1] :\n x \u2208 xs \u2192 x \u2208 nub xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:426", "score": 5, "deps": "import Mathlib\n\ndef nub [DecidableEq \u03b1]: List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(nub (xs.filter (fun y => x != y)))\ntermination_by xs => xs.length\ndecreasing_by\n simp_wf\n rw [Nat.lt_succ]\n exact List.length_filter_le _ xs\n", "proof_state": "\u03b1 : Type u_1\nx : \u03b1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 x \u2208 xs \u2192 x \u2208 nub xs", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 322], ["LeanSrc/LeanSrc/Properties.lean", 427]]}
189
+ {"full_name": "prop_elem_nub_r", "prop_defn": "theorem prop_elem_nub_r (x: \u03b1) (xs: List \u03b1) [DecidableEq \u03b1] :\n x \u2208 nub xs \u2192 x \u2208 xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:430", "score": 5, "deps": "import Mathlib\n\ndef nub [DecidableEq \u03b1]: List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(nub (xs.filter (fun y => x != y)))\ntermination_by xs => xs.length\ndecreasing_by\n simp_wf\n rw [Nat.lt_succ]\n exact List.length_filter_le _ xs\n", "proof_state": "\u03b1 : Type u_1\nx : \u03b1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 x \u2208 nub xs \u2192 x \u2208 xs", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 322], ["LeanSrc/LeanSrc/Properties.lean", 431]]}
190
+ {"full_name": "prop_count_nub", "prop_defn": "theorem prop_count_nub (x: \u03b1) (xs: List \u03b1) [DecidableEq \u03b1] :\n x \u2208 xs \u2192 (count x (nub xs) == 1):= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:434", "score": 5, "deps": "import Mathlib\n\ndef count [DecidableEq \u03b1]: \u03b1 -> List \u03b1 -> Nat\n | _z, [] => 0\n | z, x::xs => if x==z then (count z xs).succ else count z xs\n\n\ndef nub [DecidableEq \u03b1]: List \u03b1 \u2192 List \u03b1\n | [] => []\n | x::xs => x::(nub (xs.filter (fun y => x != y)))\ntermination_by xs => xs.length\ndecreasing_by\n simp_wf\n rw [Nat.lt_succ]\n exact List.length_filter_le _ xs\n", "proof_state": "\u03b1 : Type u_1\nx : \u03b1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 x \u2208 xs \u2192 (count x (nub xs) == 1) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 322], ["LeanSrc/LeanSrc/Properties.lean", 435]]}
191
+ {"full_name": "prop_perm_trans", "prop_defn": "theorem prop_perm_trans (xs ys zs: List \u03b1) [DecidableEq \u03b1] :\n isPermutation xs ys \u2192 isPermutation ys zs \u2192 isPermutation xs zs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:438", "score": 5, "deps": "import Mathlib\n\ndef deleteFirst [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then xs else x::(deleteFirst n xs)\n\n\ndef isPermutation [DecidableEq \u03b1] : List \u03b1 \u2192 List \u03b1 \u2192 Bool\n| [], ys => (ys == [])\n| x::xs, ys => x \u2208 ys && (isPermutation xs (deleteFirst x ys))\n", "proof_state": "\u03b1 : Type u_1\nxs ys zs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 isPermutation xs ys = true \u2192 isPermutation ys zs = true \u2192 isPermutation xs zs = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 331], ["LeanSrc/LeanSrc/Properties.lean", 439]]}
192
+ {"full_name": "prop_perm_refl", "prop_defn": "theorem prop_perm_refl (xs: List \u03b1) [DecidableEq \u03b1] :\n isPermutation xs xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:442", "score": 5, "deps": "import Mathlib\n\ndef deleteFirst [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then xs else x::(deleteFirst n xs)\n\n\ndef isPermutation [DecidableEq \u03b1] : List \u03b1 \u2192 List \u03b1 \u2192 Bool\n| [], ys => (ys == [])\n| x::xs, ys => x \u2208 ys && (isPermutation xs (deleteFirst x ys))\n", "proof_state": "\u03b1 : Type u_1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 isPermutation xs xs = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 331], ["LeanSrc/LeanSrc/Properties.lean", 443]]}
193
+ {"full_name": "prop_perm_symm", "prop_defn": "theorem prop_perm_symm (xs ys: List \u03b1) [DecidableEq \u03b1] :\n isPermutation xs ys \u2192 isPermutation ys xs:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:446", "score": 5, "deps": "import Mathlib\n\ndef deleteFirst [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then xs else x::(deleteFirst n xs)\n\n\ndef isPermutation [DecidableEq \u03b1] : List \u03b1 \u2192 List \u03b1 \u2192 Bool\n| [], ys => (ys == [])\n| x::xs, ys => x \u2208 ys && (isPermutation xs (deleteFirst x ys))\n", "proof_state": "\u03b1 : Type u_1\nxs ys : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 isPermutation xs ys = true \u2192 isPermutation ys xs = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 331], ["LeanSrc/LeanSrc/Properties.lean", 447]]}
194
+ {"full_name": "prop_perm_elem", "prop_defn": "theorem prop_perm_elem (x: \u03b1) (xs ys: List \u03b1) [DecidableEq \u03b1] :\n x \u2208 xs \u2192 isPermutation xs ys \u2192 x \u2208 ys:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:450", "score": 5, "deps": "import Mathlib\n\ndef deleteFirst [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then xs else x::(deleteFirst n xs)\n\n\ndef isPermutation [DecidableEq \u03b1] : List \u03b1 \u2192 List \u03b1 \u2192 Bool\n| [], ys => (ys == [])\n| x::xs, ys => x \u2208 ys && (isPermutation xs (deleteFirst x ys))\n", "proof_state": "\u03b1 : Type u_1\nx : \u03b1\nxs ys : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 x \u2208 xs \u2192 isPermutation xs ys = true \u2192 x \u2208 ys", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 331], ["LeanSrc/LeanSrc/Properties.lean", 451]]}
195
+ {"full_name": "prop_deleteAll_count", "prop_defn": "theorem prop_deleteAll_count (x: \u03b1) (xs: List \u03b1) [DecidableEq \u03b1]:\n (delete x xs == deleteFirst x xs) \u2192 count x xs <= 1:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:454", "score": 5, "deps": "import Mathlib\n\ndef delete [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then (delete n xs) else x::(delete n xs)\n\n\ndef count [DecidableEq \u03b1]: \u03b1 -> List \u03b1 -> Nat\n | _z, [] => 0\n | z, x::xs => if x==z then (count z xs).succ else count z xs\n\n\ndef deleteFirst [DecidableEq \u03b1]: \u03b1 \u2192 List \u03b1 \u2192 List \u03b1\n | _, [] => []\n | n, x::xs => if n == x then xs else x::(deleteFirst n xs)\n", "proof_state": "\u03b1 : Type u_1\nx : \u03b1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (delete x xs == deleteFirst x xs) = true \u2192 count x xs \u2264 1", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 326], ["LeanSrc/LeanSrc/Properties.lean", 455]]}
196
+ {"full_name": "prop_elem", "prop_defn": "theorem prop_elem (x: \u03b1) (xs: List \u03b1) [DecidableEq \u03b1] :\n x \u2208 xs \u2192 \u2203i, x == at' xs i:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:458", "score": 5, "deps": "import Mathlib\n\ndef at' : List \u03b1 \u2192 Nat \u2192 Option \u03b1\n | x::_, 0 => x\n | _::xs, n => at' xs (n - 1)\n | [], _ => none\n", "proof_state": "\u03b1 : Type u_1\nx : \u03b1\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 x \u2208 xs \u2192 \u2203 i, (some x == at' xs i) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 307], ["LeanSrc/LeanSrc/Properties.lean", 459]]}
197
+ {"full_name": "prop_elem_map", "prop_defn": "theorem prop_elem_map (y: \u03b2) (f: \u03b1 \u2192 \u03b2) (xs: List \u03b1) [DecidableEq \u03b2] :\n y \u2208 xs.map f \u2192 (\u2203x, (f x) == y \u2227 x \u2208 xs):= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:467", "score": 5, "deps": "import Mathlib", "proof_state": "\u03b2 : Type u_1\n\u03b1 : Type u_2\ny : \u03b2\nf : \u03b1 \u2192 \u03b2\nxs : List \u03b1\ninst\u271d : DecidableEq \u03b2\n\u22a2 y \u2208 List.map f xs \u2192 \u2203 x, (f x == y) = true \u2227 x \u2208 xs", "file_locs": [["LeanSrc/LeanSrc/Properties.lean", 468]]}
198
+ {"full_name": "prop_Flatten1", "prop_defn": "theorem prop_Flatten1 (p: MyTree \u03b1) [DecidableEq \u03b1] :\n flatten1 [p] == flatten0 p:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:474", "score": 5, "deps": "import Mathlib\n\ninductive MyTree (\u03b1: Type) where\n| leaf : MyTree \u03b1\n| node : MyTree \u03b1 \u2192 \u03b1 \u2192 MyTree \u03b1 \u2192 MyTree \u03b1\n\n\ndef f1Size : MyTree \u03b1 \u2192 Nat\n| MyTree.leaf => 1\n| MyTree.node p _x q => f1Size p + f1Size q +\n (match p with\n | MyTree.leaf => 0\n | MyTree.node _a _b _c=> 2)\n\n\nlemma f1Size_gt_zero (t: MyTree \u03b1): f1Size t > 0 := by\n induction t with\n | leaf => simp [f1Size]\n | node p _x q ih1 => simp [f1Size, ih1]\n\n\nlemma f1Size_lt_subTrees (q r: MyTree \u03b1) {x: \u03b1}: f1Size q < f1Size (MyTree.node q x r) \u2227 f1Size r < f1Size (MyTree.node q x r) := by\n simp [f1Size]\n exact \u27e8by linarith [f1Size_gt_zero r], by linarith [f1Size_gt_zero q]\u27e9;\n\n\ndef flatten0 : MyTree \u03b1 \u2192 List \u03b1\n | MyTree.leaf => []\n | MyTree.node p x q => flatten0 p ++ [x] ++ flatten0 q\n\n\ndef flatten1 : List (MyTree \u03b1) \u2192 List \u03b1\n | [] => []\n | MyTree.leaf::ps => flatten1 ps\n | (MyTree.node MyTree.leaf x q)::ps => x::(flatten1 (q::ps))\n | (MyTree.node (MyTree.node a b c) x q)::ps => flatten1 ((MyTree.node a b c)::(MyTree.node MyTree.leaf x q)::ps)\ntermination_by ps => List.sum (ps.map (fun (t: MyTree \u03b1 ) => f1Size t))\ndecreasing_by\n simp_wf\n simp [f1Size]\n simp_wf\n simp [f1Size_lt_subTrees]\n simp_wf\n simp [f1Size]\n linarith\n", "proof_state": "\u03b1 : Type\np : MyTree \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (flatten1 [p] == flatten0 p) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 373], ["LeanSrc/LeanSrc/Properties.lean", 475]]}
199
+ {"full_name": "prop_Flatten1List", "prop_defn": "theorem prop_Flatten1List (ps: List (MyTree \u03b1)) [DecidableEq \u03b1] :\n flatten1 ps == List.foldl (fun (ps2: List \u03b1) (t: MyTree \u03b1) => ps2 ++ (flatten0 t) ) [] ps:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:478", "score": 5, "deps": "import Mathlib\n\ninductive MyTree (\u03b1: Type) where\n| leaf : MyTree \u03b1\n| node : MyTree \u03b1 \u2192 \u03b1 \u2192 MyTree \u03b1 \u2192 MyTree \u03b1\n\n\ndef f1Size : MyTree \u03b1 \u2192 Nat\n| MyTree.leaf => 1\n| MyTree.node p _x q => f1Size p + f1Size q +\n (match p with\n | MyTree.leaf => 0\n | MyTree.node _a _b _c=> 2)\n\n\nlemma f1Size_gt_zero (t: MyTree \u03b1): f1Size t > 0 := by\n induction t with\n | leaf => simp [f1Size]\n | node p _x q ih1 => simp [f1Size, ih1]\n\n\nlemma f1Size_lt_subTrees (q r: MyTree \u03b1) {x: \u03b1}: f1Size q < f1Size (MyTree.node q x r) \u2227 f1Size r < f1Size (MyTree.node q x r) := by\n simp [f1Size]\n exact \u27e8by linarith [f1Size_gt_zero r], by linarith [f1Size_gt_zero q]\u27e9;\n\n\ndef flatten0 : MyTree \u03b1 \u2192 List \u03b1\n | MyTree.leaf => []\n | MyTree.node p x q => flatten0 p ++ [x] ++ flatten0 q\n\n\ndef flatten1 : List (MyTree \u03b1) \u2192 List \u03b1\n | [] => []\n | MyTree.leaf::ps => flatten1 ps\n | (MyTree.node MyTree.leaf x q)::ps => x::(flatten1 (q::ps))\n | (MyTree.node (MyTree.node a b c) x q)::ps => flatten1 ((MyTree.node a b c)::(MyTree.node MyTree.leaf x q)::ps)\ntermination_by ps => List.sum (ps.map (fun (t: MyTree \u03b1 ) => f1Size t))\ndecreasing_by\n simp_wf\n simp [f1Size]\n simp_wf\n simp [f1Size_lt_subTrees]\n simp_wf\n simp [f1Size]\n linarith\n", "proof_state": "\u03b1 : Type\nps : List (MyTree \u03b1)\ninst\u271d : DecidableEq \u03b1\n\u22a2 (flatten1 ps == List.foldl (fun ps2 t => ps2 ++ flatten0 t) [] ps) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 373], ["LeanSrc/LeanSrc/Properties.lean", 479]]}
200
+ {"full_name": "prop_Flatten2", "prop_defn": "theorem prop_Flatten2 (p: MyTree \u03b1) [DecidableEq \u03b1] :\n flatten2 p [] == flatten0 p:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:482", "score": 5, "deps": "import Mathlib\n\ninductive MyTree (\u03b1: Type) where\n| leaf : MyTree \u03b1\n| node : MyTree \u03b1 \u2192 \u03b1 \u2192 MyTree \u03b1 \u2192 MyTree \u03b1\n\n\ndef flatten0 : MyTree \u03b1 \u2192 List \u03b1\n | MyTree.leaf => []\n | MyTree.node p x q => flatten0 p ++ [x] ++ flatten0 q\n\n\ndef flatten2 : MyTree \u03b1 -> List \u03b1 -> List \u03b1\n| MyTree.leaf, ys => ys\n| MyTree.node p x q, ys => flatten2 p (x:: flatten2 q ys)\n", "proof_state": "\u03b1 : Type\np : MyTree \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (flatten2 p [] == flatten0 p) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 377], ["LeanSrc/LeanSrc/Properties.lean", 483]]}
201
+ {"full_name": "prop_Flatten3", "prop_defn": "theorem prop_Flatten3 (p: MyTree \u03b1) [DecidableEq \u03b1] :\n flatten3 p == flatten0 p:= by sorry", "prop_loc": "LeanSrc/LeanSrc/Properties.lean:486", "score": 5, "deps": "import Mathlib\n\ninductive MyTree (\u03b1: Type) where\n| leaf : MyTree \u03b1\n| node : MyTree \u03b1 \u2192 \u03b1 \u2192 MyTree \u03b1 \u2192 MyTree \u03b1\n\n\ndef flatten0 : MyTree \u03b1 \u2192 List \u03b1\n | MyTree.leaf => []\n | MyTree.node p x q => flatten0 p ++ [x] ++ flatten0 q\n\n\ndef f3Size : MyTree \u03b1 \u2192 Nat\n| MyTree.leaf => 1\n| MyTree.node p _x q => (f3Size p) * 2 + f3Size q\n\n\nlemma f3Size_gt_zero (t: MyTree \u03b1): f3Size t > 0 := by\n induction t with\n | leaf => simp [f3Size]\n | node p _ q ih1 => simp [f3Size, ih1]\n\n\ndef flatten3 : MyTree \u03b1 \u2192 List \u03b1\n| MyTree.leaf => []\n| MyTree.node (MyTree.node p x q) y r => flatten3 (MyTree.node p x (MyTree.node q y r))\n| MyTree.node MyTree.leaf x q => x :: flatten3 q\ntermination_by t => f3Size t\ndecreasing_by\n simp_wf\n simp [f3Size]\n linarith [f3Size_gt_zero p]\n simp_wf\n simp [f3Size]\n", "proof_state": "\u03b1 : Type\np : MyTree \u03b1\ninst\u271d : DecidableEq \u03b1\n\u22a2 (flatten3 p == flatten0 p) = true", "file_locs": [["LeanSrc/LeanSrc/Definitions.lean", 399], ["LeanSrc/LeanSrc/Properties.lean", 487]]}