src/HOL/Matrix/MatrixGeneral.thy
changeset 14654 aad262a36014
parent 14593 90c88e7ef62d
child 14662 d2c6a0f030ab
equal deleted inserted replaced
14653:0848ab6fe5fc 14654:aad262a36014
     1 (*  Title:      HOL/Matrix/MatrixGeneral.thy
     1 (*  Title:      HOL/Matrix/MatrixGeneral.thy
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Steven Obua
     3     Author:     Steven Obua
     4     License:    2004 Technische Universität München
     4     License:    2004 Technische UniversitÃ\<currency>t MÃ\<onequarter>nchen
     5 *)
     5 *)
     6 
     6 
     7 theory MatrixGeneral = Main:
     7 theory MatrixGeneral = Main:
     8 
     8 
     9 types 'a infmatrix = "[nat, nat] \<Rightarrow> 'a"
     9 types 'a infmatrix = "[nat, nat] \<Rightarrow> 'a"
   327 
   327 
   328 lemma combine_ncols: "f 0 0 = 0 \<Longrightarrow> ncols A <= q \<Longrightarrow> ncols B <= q \<Longrightarrow> ncols(combine_matrix f A B) <= q"
   328 lemma combine_ncols: "f 0 0 = 0 \<Longrightarrow> ncols A <= q \<Longrightarrow> ncols B <= q \<Longrightarrow> ncols(combine_matrix f A B) <= q"
   329   by (simp add: ncols_le)
   329   by (simp add: ncols_le)
   330 
   330 
   331 constdefs
   331 constdefs
   332   zero_r_neutral :: "('a \<Rightarrow> ('b::zero) \<Rightarrow> 'a) \<Rightarrow> bool"
   332   zero_r_neutral :: "('a \<Rightarrow> 'b::zero \<Rightarrow> 'a) \<Rightarrow> bool"
   333   "zero_r_neutral f == ! a. f a 0 = a"
   333   "zero_r_neutral f == ! a. f a 0 = a"
   334   zero_l_neutral :: "('a \<Rightarrow> ('b::zero) \<Rightarrow> 'a) \<Rightarrow> bool"
   334   zero_l_neutral :: "('a::zero \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> bool"
   335   "zero_l_neutral f == ! a. f 0 a = a"
   335   "zero_l_neutral f == ! a. f 0 a = a"
   336   zero_closed :: "(('a::zero) \<Rightarrow> ('b::zero) \<Rightarrow> ('c::zero)) \<Rightarrow> bool"
   336   zero_closed :: "(('a::zero) \<Rightarrow> ('b::zero) \<Rightarrow> ('c::zero)) \<Rightarrow> bool"
   337   "zero_closed f == (!x. f x 0 = 0) & (!y. f 0 y = 0)"
   337   "zero_closed f == (!x. f x 0 = 0) & (!y. f 0 y = 0)"
   338 
   338 
   339 consts foldseq :: "('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a"
   339 consts foldseq :: "('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a"