Theory Ring_Zariski_ZF_2

(* 
    This file is a part of IsarMathLib - 
    a library of formalized mathematics written for Isabelle/Isar.

    Copyright (C) 2022  Daniel de la Concepcion

    This program is free software; Redistribution and use in source and binary forms, 
    with or without modification, are permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice, 
   this list of conditions and the following disclaimer.
   2. Redistributions in binary form must reproduce the above copyright notice, 
   this list of conditions and the following disclaimer in the documentation and/or 
   other materials provided with the distribution.
   3. The name of the author may not be used to endorse or promote products 
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*)

section Rings - Zariski Topology - Properties

theory Ring_Zariski_ZF_2 imports Ring_Zariski_ZF Topology_ZF_1

begin

theorem (in ring0) zariski_t0:
  shows "{D(I). I}{is T0}" unfolding isT0_def
proof-
  {
    fix x y assume ass:"x:Spec" "y:Spec" "xy"
    from ass(3) have "¬(xy)  ¬(yx)" by auto
    then have "yD(x)  xD(y)" using ass(1,2)
      unfolding Spec_def using ass(1,2) openBasic_def
      by auto
    then have "(x  D(y)  y  D(y))  (y  D(x)  x  D(x))"
      using ass(1,2) unfolding Spec_def
      using openBasic_def by auto
    then have "U{D(I). I}. (x  U  y  U)  (y  U  x  U)"
      using ass(1,2) unfolding Spec_def by auto
  }
  then show "x y. x  RepFun(, D)  y  RepFun(, D)  x  y 
          (URepFun(, D). x  U  y  U  y  U  x  U)" 
    using total_spec by auto
qed

textNoetherian rings have compact Zariski topology

theorem (in ring0) zariski_compact:
  assumes "I. (I{is finitely generated})"
  shows "Spec {is compact in} {D(I). I}"
  unfolding IsCompact_def
proof(safe)
  show "x. x  Spec  x  RepFun(, D)" using total_spec by auto
  fix M assume M:"M  RepFun(, D)" "Spec  M"
  let ?J ="{J. D(J)M}"
  have m:"M = RepFun(?J,D)" using M(1) by auto
  then have mm:"M = D(I?J)" using union_open_basic[of ?J] by auto
  obtain T where T:"TFinPow(?J)" "(I?J) = IT" using
    sum_ideals_noetherian[OF assms(1), of ?J] by blast
  from T(2) have "D(I?J) = D(IT)" by auto
  moreover have "T" using T(1) unfolding FinPow_def by auto
  ultimately have "D(I?J) = RepFun(T,D)" using union_open_basic[of T]
    by auto
  with mm have "M = RepFun(T,D)" by auto
  then have "Spec  RepFun(T,D)" using M(2) by auto moreover
  from T(1) have "RepFun(T,D)  RepFun(?J,D)" unfolding FinPow_def by auto
  with m have "RepFun(T,D)  M" by auto moreover
  from T(1) have "Finite(RepFun(T,D))" unfolding FinPow_def
    using Finite_RepFun by auto
  ultimately show "NFinPow(M). Spec  N" unfolding FinPow_def
    by auto
qed
  
end