src/HOL/Matrix/Matrix.thy
changeset 42463 f270e3e18be5
parent 41413 64cd30d6b0b8
child 44174 d1d79f0e1ea6
equal deleted inserted replaced
42462:0fd80c27fdf5 42463:f270e3e18be5
     4 
     4 
     5 theory Matrix
     5 theory Matrix
     6 imports Main "~~/src/HOL/Library/Lattice_Algebras"
     6 imports Main "~~/src/HOL/Library/Lattice_Algebras"
     7 begin
     7 begin
     8 
     8 
     9 types 'a infmatrix = "nat \<Rightarrow> nat \<Rightarrow> 'a"
     9 type_synonym 'a infmatrix = "nat \<Rightarrow> nat \<Rightarrow> 'a"
    10 
    10 
    11 definition nonzero_positions :: "(nat \<Rightarrow> nat \<Rightarrow> 'a::zero) \<Rightarrow> nat \<times> nat \<Rightarrow> bool" where
    11 definition nonzero_positions :: "(nat \<Rightarrow> nat \<Rightarrow> 'a::zero) \<Rightarrow> nat \<times> nat \<Rightarrow> bool" where
    12   "nonzero_positions A = {pos. A (fst pos) (snd pos) ~= 0}"
    12   "nonzero_positions A = {pos. A (fst pos) (snd pos) ~= 0}"
    13 
    13 
    14 typedef 'a matrix = "{(f::(nat \<Rightarrow> nat \<Rightarrow> 'a::zero)). finite (nonzero_positions f)}"
    14 typedef 'a matrix = "{(f::(nat \<Rightarrow> nat \<Rightarrow> 'a::zero)). finite (nonzero_positions f)}"