Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lean4Lean.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module
prelude
import Lean4Lean.Environment

/-
Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Declaration.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean.Declaration
module

public import Lean.Declaration

@[expose] public section


namespace Lean
Expand Down
12 changes: 8 additions & 4 deletions Lean4Lean/Environment.lean
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Lean4Lean.TypeChecker
import Lean4Lean.Quot
import Lean4Lean.Inductive.Add
import Lean4Lean.Primitive
module

public import Lean4Lean.TypeChecker
public import Lean4Lean.Quot
public import Lean4Lean.Inductive.Add
public import Lean4Lean.Primitive

@[expose] public section

namespace Lean4Lean
open Lean hiding Environment Exception
Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Environment/Basic.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean.Environment
import Batteries.Tactic.OpenPrivate
module

public import Lean.Environment
public import Batteries.Tactic.OpenPrivate

@[expose] public section

namespace Lean.Kernel.Environment

Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/EquivManager.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Batteries.Data.UnionFind.Basic
import Lean4Lean.PtrEq
module

public import Batteries.Data.UnionFind.Basic
public import Lean4Lean.PtrEq

@[expose] public section

namespace Lean4Lean
open Lean
Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/CoinductiveLogRel.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Theory.Typing.HeadReduction
module

public import Lean4Lean.Theory.Typing.HeadReduction

@[expose] public section

namespace Lean4Lean
namespace VEnv
Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/DomainTheory.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.SExpr
module

public import Lean4Lean.Experimental.SExpr

@[expose] public section

namespace Lean4Lean

Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/LogRel.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.SExpr
module

public import Lean4Lean.Experimental.SExpr

@[expose] public section

namespace Lean4Lean

Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/MoreStepIndexed.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.SExpr
module

public import Lean4Lean.Experimental.SExpr

@[expose] public section

namespace Lean4Lean

Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Experimental/NormalEq.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean4Lean.Theory.Typing.Lemmas
import Lean4Lean.Theory.Typing.Pattern
module

public import Lean4Lean.Theory.Typing.Lemmas
public import Lean4Lean.Theory.Typing.Pattern

@[expose] public section

-- TODO: remove, this is now part of ChurchRosser.lean

Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Experimental/ParallelReduction.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean4Lean.Theory.Typing.Strong
import Lean4Lean.Experimental.NormalEq
module

public import Lean4Lean.Theory.Typing.Strong
public import Lean4Lean.Experimental.NormalEq

@[expose] public section

-- TODO: remove, this is now part of ChurchRosser.lean

Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Experimental/SExpr.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean4Lean.Theory.Typing.Lemmas
import Lean4Lean.Theory.Typing.Pattern
module

public import Lean4Lean.Theory.Typing.Lemmas
public import Lean4Lean.Theory.Typing.Pattern

@[expose] public section

namespace Lean4Lean

Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/ShapeLogRel.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.SExpr
module

public import Lean4Lean.Experimental.SExpr

@[expose] public section

namespace Lean4Lean

Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/ShapeLogRelAdequacy.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.ShapeLogRel
module

public import Lean4Lean.Experimental.ShapeLogRel

@[expose] public section

namespace Lean4Lean

Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/StepIndexed.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.SExpr
module

public import Lean4Lean.Experimental.SExpr

@[expose] public section

namespace Lean4Lean

Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Experimental/Stratified.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean4Lean.Theory.Typing.Lemmas
import Lean4Lean.Theory.Typing.Strong
module

public import Lean4Lean.Theory.Typing.Lemmas
public import Lean4Lean.Theory.Typing.Strong

@[expose] public section

namespace Lean4Lean
namespace VEnv
Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Experimental/StratifiedUntyped.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean4Lean.Theory.Typing.Lemmas
import Lean4Lean.Theory.Typing.Strong
module

public import Lean4Lean.Theory.Typing.Lemmas
public import Lean4Lean.Theory.Typing.Strong

@[expose] public section

namespace Lean4Lean
namespace VEnv
Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/Stronger.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Theory.Typing.Lemmas
module

public import Lean4Lean.Theory.Typing.Lemmas

@[expose] public section

namespace Lean4Lean

Expand Down
4 changes: 4 additions & 0 deletions Lean4Lean/Experimental/Thierry.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module

@[expose] public section

/-!
# Partial formalization of Coquand & Huber, "An Adequacy Theorem for Dependent Type Theory"
https://doi.org/10.1007/s00224-018-9879-9
Expand Down
4 changes: 4 additions & 0 deletions Lean4Lean/Experimental/Thierry2.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module

/-!
# Partial formalization of Coquand & Huber, "An Adequacy Theorem for Dependent Type Theory"
https://doi.org/10.1007/s00224-018-9879-9
Expand Down Expand Up @@ -829,3 +831,5 @@ theorem DefEqLamF.mono_r : DefEqF (n := n) B B .U a .U → DefEqPiF DefEqF B F F
termination_by 2 * n + 1

end

@[expose] public section
6 changes: 5 additions & 1 deletion Lean4Lean/Experimental/UniqueTyping.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean4Lean.Experimental.ShapeLogRelAdequacy
module

public import Lean4Lean.Experimental.ShapeLogRelAdequacy

@[expose] public section

/-! # Unique typing over the SExpr weak defeq.

Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/Expr.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean.Environment
module

public import Lean.Environment

@[expose] public section

namespace Lean
namespace Expr
Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/ForEachExprV.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean.Expr
import Lean.Util.MonadCache
module

public import Lean.Expr
public import Lean.Util.MonadCache

@[expose] public section

/-!
This is the same as `Expr.forEach` but it uses `StateT` instead of `StateRefT` to avoid opaques.
Expand Down
10 changes: 7 additions & 3 deletions Lean4Lean/Inductive/Add.lean
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Batteries.Data.List.Basic
import Lean4Lean.Environment.Basic
import Lean4Lean.TypeChecker
module

public import Batteries.Data.List.Basic
public import Lean4Lean.Environment.Basic
public import Lean4Lean.TypeChecker

@[expose] public section

namespace Lean4Lean
open Lean hiding Environment Exception
Expand Down
10 changes: 7 additions & 3 deletions Lean4Lean/Inductive/Reduce.lean
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Lean.Structure
import Lean4Lean.Expr
import Lean4Lean.Environment.Basic
module

public import Lean.Structure
public import Lean4Lean.Expr
public import Lean4Lean.Environment.Basic

@[expose] public section

namespace Lean4Lean
open Lean hiding Environment
Expand Down
10 changes: 7 additions & 3 deletions Lean4Lean/Instantiate.lean
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Lean.Expr
import Lean.LocalContext
import Lean.Util.InstantiateLevelParams
module

public import Lean.Expr
public import Lean.LocalContext
public import Lean.Util.InstantiateLevelParams

@[expose] public section

namespace Lean
namespace Expr
Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Level.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean
import Lean4Lean.List
module

public import Lean
public import Lean4Lean.List

@[expose] public section

namespace Lean.Level

Expand Down
3 changes: 3 additions & 0 deletions Lean4Lean/List.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module

@[expose] public section

@[specialize] def List.all2 (R : α → α → Bool) : List α → List α → Bool
| a1 :: as1, a2 :: as2 => R a1 a2 && all2 R as1 as2
Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/LocalContext.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean.LocalContext
module

public import Lean.LocalContext

@[expose] public section

namespace Lean4Lean
open Lean
Expand Down
8 changes: 6 additions & 2 deletions Lean4Lean/Primitive.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Lean4Lean.TypeChecker
import Lean4Lean.Environment.Basic
module

public import Lean4Lean.TypeChecker
public import Lean4Lean.Environment.Basic

@[expose] public section

namespace Lean4Lean
namespace Environment
Expand Down
6 changes: 5 additions & 1 deletion Lean4Lean/PtrEq.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Lean.Declaration
module

public import Lean.Declaration

@[expose] public section

namespace Lean4Lean
open Lean
Expand Down
14 changes: 9 additions & 5 deletions Lean4Lean/Quot.lean
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Batteries.Tactic.OpenPrivate
import Lean4Lean.Environment.Basic
import Lean4Lean.Expr
import Lean4Lean.Instantiate
import Lean4Lean.LocalContext
module

public import Batteries.Tactic.OpenPrivate
public import Lean4Lean.Environment.Basic
public import Lean4Lean.Expr
public import Lean4Lean.Instantiate
public import Lean4Lean.LocalContext

@[expose] public section

namespace Lean4Lean
open Lean hiding Environment Exception
Expand Down
14 changes: 9 additions & 5 deletions Lean4Lean/Std/Basic.lean
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Batteries.CodeAction
import Batteries.Data.Array.Lemmas
import Batteries.Data.HashMap.Basic
import Batteries.Data.UnionFind.Basic
import Batteries.Tactic.SeqFocus
module

public import Batteries.CodeAction
public import Batteries.Data.Array.Lemmas
public import Batteries.Data.HashMap.Basic
public import Batteries.Data.UnionFind.Basic
public import Batteries.Tactic.SeqFocus

@[expose] public section

open Std

Expand Down
4 changes: 4 additions & 0 deletions Lean4Lean/Std/Control.lean
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
module


instance [Alternative m] : MonadLift Option m := ⟨fun | none => failure | some a => pure a⟩

@[expose] public section
8 changes: 6 additions & 2 deletions Lean4Lean/Std/HashMap.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Std.Data.HashMap.Lemmas
import Lean
module

public import Std.Data.HashMap.Lemmas
public import Lean

@[expose] public section

namespace Std.Internal.List

Expand Down
Loading