Skip to content

Commit

Permalink
linear properties of get/set/introElem
Browse files Browse the repository at this point in the history
  • Loading branch information
lecopivo committed Dec 1, 2023
1 parent 8ae5880 commit 4d5e6e0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ test/%.run: build

examples:
lake build SurfaceMeshTests
./build/bin/SurfaceMeshTests
# ./build/bin/SurfaceMeshTests
lake build HarmonicOscillator
./build/bin/HarmonicOscillator
# ./build/bin/HarmonicOscillator

lint: build
./build/bin/runLinter
24 changes: 24 additions & 0 deletions SciLean/Data/ArrayType/Properties.lean
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ variable
{X : Type} [Vec K X]
[Vec K Elem]

@[fprop]
theorem GetElem.getElem.arg_xs.IsLinearMap_rule_simple
(idx : Idx) (dom)
: IsLinearMap K (fun xs : Cont => getElem xs idx dom) := sorry_proof

#generate_linear_map_simps GetElem.getElem.arg_xs.IsLinearMap_rule_simple

@[fprop]
theorem GetElem.getElem.arg_xs.IsDifferentiable_rule
(f : X → Cont) (idx : Idx) (dom)
Expand Down Expand Up @@ -292,6 +299,17 @@ variable
{X : Type _} [Vec K X]
[Vec K Elem]

@[fprop]
theorem SetElem.setElem.arg_cont.IsLinearMap_rule_simple (idx : Idx)
: IsLinearMap K (fun xs : Cont => setElem xs idx 0) := sorry_proof

@[fprop]
theorem SetElem.setElem.arg_elem.IsLinearMap_rule_simple (idx : Idx)
: IsLinearMap K (fun elem : Elem => setElem (0 : Cont) idx elem) := sorry_proof

#generate_linear_map_simps SciLean.SetElem.setElem.arg_cont.IsLinearMap_rule_simple
#generate_linear_map_simps SciLean.SetElem.setElem.arg_elem.IsLinearMap_rule_simple

@[fprop]
theorem SetElem.setElem.arg_contelem.IsDifferentiable_rule
(cont : X → Cont) (idx : Idx) (elem : X → Elem)
Expand Down Expand Up @@ -584,6 +602,12 @@ variable
{X : Type _} [Vec K X]
[Vec K Elem]

@[fprop]
theorem IntroElem.introElem.arg_f.IsLinearMap_rule_simple
: IsLinearMap K (fun f : Idx → Elem => introElem (Cont:=Cont) f) := sorry_proof

#generate_linear_map_simps SciLean.IntroElem.introElem.arg_f.IsLinearMap_rule_simple

@[fprop]
theorem IntroElem.introElem.arg_f.IsDifferentiable_rule
(f : X → Idx → Elem)
Expand Down

0 comments on commit 4d5e6e0

Please sign in to comment.