Skip to content

Commit

Permalink
Cleanup mathlib imports in Lampe
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenciak committed Jan 8, 2025
1 parent 8d052fd commit f4f98a5
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 16 deletions.
1 change: 1 addition & 0 deletions Lampe/Lampe.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Mathlib
import Lampe.Basic
open Lampe

Expand Down
2 changes: 0 additions & 2 deletions Lampe/Lampe/Ast.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Mathlib

import Lampe.Tp
import Lampe.Data.HList
import Lampe.SeparationLogic.ValHeap
Expand Down
2 changes: 1 addition & 1 deletion Lampe/Lampe/Builtin/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Lampe.SeparationLogic.ValHeap
import Lampe.Data.Field
import Lampe.Data.HList
import Lampe.Builtin.Helpers
import Mathlib
import Mathlib.Tactic.Lemma

lemma List.replicate_head (hl : x :: xs = List.replicate n a) : x = a := by
unfold List.replicate at hl
Expand Down
2 changes: 1 addition & 1 deletion Lampe/Lampe/Builtin/Helpers.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Mathlib
import Mathlib.Tactic.Linarith

namespace Lampe

Expand Down
2 changes: 1 addition & 1 deletion Lampe/Lampe/Builtin/Slice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def replaceSlice' (s : Tp.denote p $ .slice tp) (i : Fin s.length) (v : Tp.denot
List.modifyNth (fun _ => v) i s

@[simp]
lemma replaceSlice_length_eq_length :
theorem replaceSlice_length_eq_length :
(replaceSlice' s i v).length = s.length := by
simp_all [List.length_modifyNth]

Expand Down
2 changes: 2 additions & 0 deletions Lampe/Lampe/Builtin/Struct.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Mathlib.Algebra.PUnitInstances.Algebra -- TODO: This import is necessary for the
-- `CommRing Unit` instance, but shouldn't be needed
import Lampe.Builtin.Basic

namespace Lampe.Builtin
Expand Down
2 changes: 1 addition & 1 deletion Lampe/Lampe/Data/Field.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Mathlib
import Mathlib.Algebra.Algebra.ZMod
import Lampe.Data.Integers

namespace Lampe
Expand Down
2 changes: 0 additions & 2 deletions Lampe/Lampe/Data/Integers.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Mathlib

namespace Lampe

abbrev U (n : Nat) := BitVec (n)
Expand Down
2 changes: 0 additions & 2 deletions Lampe/Lampe/Semantics.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Mathlib

import Lampe.Ast
import Lampe.Tp
import Lampe.Data.Field
Expand Down
2 changes: 0 additions & 2 deletions Lampe/Lampe/SeparationLogic/LawfulHeap.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Lampe.Tp

namespace Lampe

class LawfulHeap (α : Type _) where
Expand Down
3 changes: 3 additions & 0 deletions Lampe/Lampe/SeparationLogic/SLP.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Mathlib.Tactic.Tauto
import Mathlib.Tactic.Use
import Lampe.Data.Field
import Lampe.Tactic.IntroCases
import Lampe.SeparationLogic.LawfulHeap

Expand Down
2 changes: 2 additions & 0 deletions Lampe/Lampe/SeparationLogic/ValHeap.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Mathlib.Data.Finmap
import Lampe.SeparationLogic.LawfulHeap
import Lampe.SeparationLogic.SLP
import Lampe.Tp

lemma Finmap.insert_eq_singleton_union [DecidableEq α] {ref : α}:
m.insert ref v = Finmap.singleton ref v ∪ m := by rfl
Expand Down
3 changes: 1 addition & 2 deletions Lampe/Lampe/Syntax.lean
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Mathlib
import Lean
import Lampe.Ast
import Qq

import Lampe.Ast
import Lampe.Builtin.Arith
import Lampe.Builtin.Array
import Lampe.Builtin.BigInt
Expand Down
2 changes: 0 additions & 2 deletions Lampe/Lampe/Tp.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Mathlib

import Lampe.Data.Integers
import Lampe.Data.Field
import Lampe.Data.HList
Expand Down

0 comments on commit f4f98a5

Please sign in to comment.