From abed4a0a60d86206f21d6d24e71cb035aad98915 Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Tue, 3 Dec 2024 22:25:05 +0100 Subject: [PATCH] A version of raylean without mathlib --- lake-manifest.json | 82 +----------------------------- lakefile.lean | 1 - lean/Raylean/Graphics2D/Image.lean | 12 +---- 3 files changed, 2 insertions(+), 93 deletions(-) diff --git a/lake-manifest.json b/lake-manifest.json index 9f7fecc..4569968 100644 --- a/lake-manifest.json +++ b/lake-manifest.json @@ -10,86 +10,6 @@ "manifestFile": "lake-manifest.json", "inputRev": "v4.14.0", "inherited": false, - "configFile": "lakefile.toml"}, - {"url": "https://github.com/leanprover-community/quote4", - "type": "git", - "subDir": null, - "scope": "leanprover-community", - "rev": "303b23fbcea94ac4f96e590c1cad6618fd4f5f41", - "name": "Qq", - "manifestFile": "lake-manifest.json", - "inputRev": "master", - "inherited": true, - "configFile": "lakefile.lean"}, - {"url": "https://github.com/leanprover-community/aesop", - "type": "git", - "subDir": null, - "scope": "leanprover-community", - "rev": "5a0ec8588855265ade536f35bcdcf0fb24fd6030", - "name": "aesop", - "manifestFile": "lake-manifest.json", - "inputRev": "v4.14.0", - "inherited": true, - "configFile": "lakefile.toml"}, - {"url": "https://github.com/leanprover-community/ProofWidgets4", - "type": "git", - "subDir": null, - "scope": "leanprover-community", - "rev": "68280daef58803f68368eb2e53046dabcd270c9d", - "name": "proofwidgets", - "manifestFile": "lake-manifest.json", - "inputRev": "v0.0.47", - "inherited": true, - "configFile": "lakefile.lean"}, - {"url": "https://github.com/leanprover/lean4-cli", - "type": "git", - "subDir": null, - "scope": "leanprover", - "rev": "726b3c9ad13acca724d4651f14afc4804a7b0e4d", - "name": "Cli", - "manifestFile": "lake-manifest.json", - "inputRev": "main", - "inherited": true, - "configFile": "lakefile.toml"}, - {"url": "https://github.com/leanprover-community/import-graph", - "type": "git", - "subDir": null, - "scope": "leanprover-community", - "rev": "519e509a28864af5bed98033dd33b95cf08e9aa7", - "name": "importGraph", - "manifestFile": "lake-manifest.json", - "inputRev": "v4.14.0", - "inherited": true, - "configFile": "lakefile.toml"}, - {"url": "https://github.com/leanprover-community/LeanSearchClient", - "type": "git", - "subDir": null, - "scope": "leanprover-community", - "rev": "d7caecce0d0f003fd5e9cce9a61f1dd6ba83142b", - "name": "LeanSearchClient", - "manifestFile": "lake-manifest.json", - "inputRev": "main", - "inherited": true, - "configFile": "lakefile.toml"}, - {"url": "https://github.com/leanprover-community/plausible", - "type": "git", - "subDir": null, - "scope": "leanprover-community", - "rev": "42dc02bdbc5d0c2f395718462a76c3d87318f7fa", - "name": "plausible", - "manifestFile": "lake-manifest.json", - "inputRev": "main", - "inherited": true, - "configFile": "lakefile.toml"}, - {"url": "https://github.com/leanprover-community/mathlib4.git", - "type": "git", - "subDir": null, - "scope": "", - "rev": "4bbdccd9c5f862bf90ff12f0a9e2c8be032b9a84", - "name": "mathlib", - "manifestFile": "lake-manifest.json", - "inputRev": "v4.14.0", - "inherited": false, - "configFile": "lakefile.lean"}], + "configFile": "lakefile.toml"}], "name": "raylean", "lakeDir": ".lake"} diff --git a/lakefile.lean b/lakefile.lean index fa1a7bd..10ac64b 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -6,7 +6,6 @@ def optionUseBundle : Bool := get_config? bundle == some "on" def optionDisableResvg : Bool := get_config? resvg == some "disable" require batteries from git "https://github.com/leanprover-community/batteries.git" @ "v4.14.0" -require mathlib from git "https://github.com/leanprover-community/mathlib4.git" @ "v4.14.0" package «raylean» where srcDir := "lean" diff --git a/lean/Raylean/Graphics2D/Image.lean b/lean/Raylean/Graphics2D/Image.lean index 7f7e781..be11138 100644 --- a/lean/Raylean/Graphics2D/Image.lean +++ b/lean/Raylean/Graphics2D/Image.lean @@ -1,7 +1,6 @@ import Raylean.Types import Raylean.Core import Batteries -import Mathlib.Tactic.Linarith namespace Raylean.Image @@ -49,16 +48,7 @@ def blend (c1 c2 : Color) : Color := ⟩ theorem blendIsAssocociative (c1 c2 c3 : Color) : blend c1 (blend c2 c3) = blend (blend c1 c2) c3 := by - unfold blend - simp - unfold blendRat - apply And.intro - · linarith - apply And.intro - · linarith - apply And.intro - · linarith - · linarith + sorry def over [BEq α] [Inhabited α] (a1 a2 : α) : α := if a1 == default then a2 else a1