[GOAL]
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
w :
  ∀ (x : { x // x ∈ U }),
    ∃ V x i,
      PrelocalPredicate.pred
        { pred := fun {U} => PrelocalPredicate.pred src✝,
          res :=
            (_ :
              ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),
                PrelocalPredicate.pred src✝ f →
                  PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ PrelocalPredicate.pred
    { pred := fun {U} => PrelocalPredicate.pred src✝,
      res :=
        (_ :
          ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),
            PrelocalPredicate.pred src✝ f →
              PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
    f
[PROOFSTEP]
apply continuous_iff_continuousAt.2
[GOAL]
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
w :
  ∀ (x : { x // x ∈ U }),
    ∃ V x i,
      PrelocalPredicate.pred
        { pred := fun {U} => PrelocalPredicate.pred src✝,
          res :=
            (_ :
              ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),
                PrelocalPredicate.pred src✝ f →
                  PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ∀ (x : { x // x ∈ U }), ContinuousAt f x
[PROOFSTEP]
intro x
[GOAL]
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
w :
  ∀ (x : { x // x ∈ U }),
    ∃ V x i,
      PrelocalPredicate.pred
        { pred := fun {U} => PrelocalPredicate.pred src✝,
          res :=
            (_ :
              ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),
                PrelocalPredicate.pred src✝ f →
                  PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
x : { x // x ∈ U }
⊢ ContinuousAt f x
[PROOFSTEP]
specialize w x
[GOAL]
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
x : { x // x ∈ U }
w :
  ∃ V x i,
    PrelocalPredicate.pred
      { pred := fun {U} => PrelocalPredicate.pred src✝,
        res :=
          (_ :
            ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),
              PrelocalPredicate.pred src✝ f →
                PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
      fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ContinuousAt f x
[PROOFSTEP]
rcases w with ⟨V, m, i, w⟩
[GOAL]
case intro.intro.intro
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
w :
  PrelocalPredicate.pred
    { pred := fun {U} => PrelocalPredicate.pred src✝,
      res :=
        (_ :
          ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),
            PrelocalPredicate.pred src✝ f →
              PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
    fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ContinuousAt f x
[PROOFSTEP]
dsimp at w
[GOAL]
case intro.intro.intro
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
w : Continuous fun x => f { val := ↑x, property := (_ : ↑x ∈ ↑U) }
⊢ ContinuousAt f x
[PROOFSTEP]
rw [continuous_iff_continuousAt] at w
[GOAL]
case intro.intro.intro
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
w : ∀ (x : { x // x ∈ V }), ContinuousAt (fun x => f { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x
⊢ ContinuousAt f x
[PROOFSTEP]
specialize w ⟨x, m⟩
[GOAL]
case intro.intro.intro
X : TopCat
T✝ : ↑X → Type v
T : TopCat
src✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T
U : Opens ↑X
f : { x // x ∈ U } → ↑T
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
w : ContinuousAt (fun x => f { val := ↑x, property := (_ : ↑x ∈ ↑U) }) { val := ↑x, property := m }
⊢ ContinuousAt f x
[PROOFSTEP]
simpa using (Opens.openEmbedding_of_le i.le).continuousAt_iff.1 w
[GOAL]
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
V U : Opens ↑X
i : V ⟶ U
f : (x : { x // x ∈ U }) → T ↑x
w :
  (fun {U} f =>
      ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
    f
x : { x // x ∈ V }
⊢ ∃ V_1 x i_1,
    pred P fun x =>
      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
specialize w (i x)
[GOAL]
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
V U : Opens ↑X
i : V ⟶ U
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ V }
w : ∃ V_1 x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ∃ V_1 x i_1,
    pred P fun x =>
      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
rcases w with ⟨V', m', i', p⟩
[GOAL]
case intro.intro.intro
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
V U : Opens ↑X
i : V ⟶ U
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ V }
V' : Opens ↑X
m' : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x) ∈ V'
i' : V' ⟶ U
p : pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ∃ V_1 x i_1,
    pred P fun x =>
      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
refine' ⟨V ⊓ V', ⟨x.2, m'⟩, Opens.infLELeft _ _, _⟩
[GOAL]
case intro.intro.intro
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
V U : Opens ↑X
i : V ⟶ U
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ V }
V' : Opens ↑X
m' : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x) ∈ V'
i' : V' ⟶ U
p : pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ pred P fun x =>
    (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
convert P.res (Opens.infLERight V V') _ p
[GOAL]
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
U : Opens ↑X
f : (x : { x // x ∈ U }) → T ↑x
w :
  ∀ (x : { x // x ∈ U }),
    ∃ V x i,
      pred
        {
          pred := fun {U} f =>
            ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x),
          res :=
            (_ :
              ∀ {V U : Opens ↑X} (i : V ⟶ U) (f : (x : { x // x ∈ U }) → T ↑x),
                (∀ (x : { x // x ∈ U }),
                    ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) →
                  ∀ (x : { x // x ∈ V }),
                    ∃ V_1 x i_1,
                      pred P fun x =>
                        (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
x : { x // x ∈ U }
⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
specialize w x
[GOAL]
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
U : Opens ↑X
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ U }
w :
  ∃ V x i,
    pred
      {
        pred := fun {U} f =>
          ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x),
        res :=
          (_ :
            ∀ {V U : Opens ↑X} (i : V ⟶ U) (f : (x : { x // x ∈ U }) → T ↑x),
              (∀ (x : { x // x ∈ U }),
                  ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) →
                ∀ (x : { x // x ∈ V }),
                  ∃ V_1 x i_1,
                    pred P fun x =>
                      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
      fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
rcases w with ⟨V, m, i, p⟩
[GOAL]
case intro.intro.intro
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
U : Opens ↑X
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
p :
  pred
    {
      pred := fun {U} f =>
        ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x),
      res :=
        (_ :
          ∀ {V U : Opens ↑X} (i : V ⟶ U) (f : (x : { x // x ∈ U }) → T ↑x),
            (∀ (x : { x // x ∈ U }),
                ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) →
              ∀ (x : { x // x ∈ V }),
                ∃ V_1 x i_1,
                  pred P fun x =>
                    (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }
    fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
specialize p ⟨x.1, m⟩
[GOAL]
case intro.intro.intro
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
U : Opens ↑X
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
p :
  ∃ V_1 x i_1,
    pred P fun x =>
      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
rcases p with ⟨V', m', i', p'⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
U : Opens ↑X
f : (x : { x // x ∈ U }) → T ↑x
x : { x // x ∈ U }
V : Opens ↑X
m : ↑x ∈ V
i : V ⟶ U
V' : Opens ↑X
m' : ↑{ val := ↑x, property := m } ∈ V'
i' : V' ⟶ V
p' :
  pred P fun x =>
    (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
exact ⟨V', m', i' ≫ i, p'⟩
[GOAL]
X : TopCat
T✝ T : ↑X → Type v
P : PrelocalPredicate T
U : Opens ↑X
f : (x : { x // x ∈ U }) → T ↑x
h : pred P f
x : { x // x ∈ U }
⊢ pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
convert h
[GOAL]
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s
[PROOFSTEP]
let sf' : ∀ i : ι, (presheafToTypes X T).obj (op (U i)) := fun i => (sf i).val
[GOAL]
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s
[PROOFSTEP]
have sf'_comp : (presheafToTypes X T).IsCompatible U sf' := fun i j =>
  congr_arg Subtype.val
    (sf_comp i j)
      -- So, we can obtain a unique gluing
[GOAL]
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s
[PROOFSTEP]
obtain ⟨gl, gl_spec, gl_uniq⟩ := (sheafToTypes X T).existsUnique_gluing U sf' sf'_comp
[GOAL]
case intro.intro
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s
[PROOFSTEP]
refine' ⟨⟨gl, _⟩, _, _⟩
[GOAL]
case intro.intro.refine'_1
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
⊢ PrelocalPredicate.pred P.toPrelocalPredicate gl
[PROOFSTEP]
apply P.locality
[GOAL]
case intro.intro.refine'_1.x
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
⊢ ∀ (x : { x // x ∈ (op (iSup U)).unop }),
    ∃ V x i,
      PrelocalPredicate.pred P.toPrelocalPredicate fun x =>
        gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)
[PROOFSTEP]
rintro
  ⟨x, mem⟩
      -- Once we're at a particular point `x`, we can select some open set `x ∈ U i`.
[GOAL]
case intro.intro.refine'_1.x.mk
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
x : ↑X
mem : x ∈ (op (iSup U)).unop
⊢ ∃ V x i,
    PrelocalPredicate.pred P.toPrelocalPredicate fun x =>
      gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)
[PROOFSTEP]
choose i hi using Opens.mem_iSup.mp mem
[GOAL]
case intro.intro.refine'_1.x.mk
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
x : ↑X
mem : x ∈ (op (iSup U)).unop
i : ι
hi : x ∈ U i
⊢ ∃ V x i,
    PrelocalPredicate.pred P.toPrelocalPredicate fun x =>
      gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)
[PROOFSTEP]
use U i, hi, Opens.leSupr U i
[GOAL]
case h
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
x : ↑X
mem : x ∈ (op (iSup U)).unop
i : ι
hi : x ∈ U i
⊢ PrelocalPredicate.pred P.toPrelocalPredicate fun x =>
    gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)
[PROOFSTEP]
convert (sf i).property using 1
[GOAL]
case h.e'_5.h
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
x : ↑X
mem : x ∈ (op (iSup U)).unop
i : ι
hi : x ∈ U i
e_4✝ : U i = (op (U i)).unop
⊢ (fun x => gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)) = ↑(sf i)
[PROOFSTEP]
exact gl_spec i
[GOAL]
case intro.intro.refine'_2
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
⊢ (fun s => IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s)
    { val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }
[PROOFSTEP]
exact fun i => Subtype.ext (gl_spec i)
[GOAL]
case intro.intro.refine'_3
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
⊢ ∀ (y : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))),
    (fun s => IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s) y →
      y = { val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }
[PROOFSTEP]
intro gl' hgl'
[GOAL]
case intro.intro.refine'_3
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
gl' : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))
hgl' : IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf gl'
⊢ gl' = { val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }
[PROOFSTEP]
refine Subtype.ext ?_
[GOAL]
case intro.intro.refine'_3
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf
sf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : IsCompatible (presheafToTypes X T) U sf'
gl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))
gl_spec : IsGluing (sheafToTypes X T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),
    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl
gl' : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))
hgl' : IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf gl'
⊢ ↑gl' = ↑{ val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }
[PROOFSTEP]
exact gl_uniq gl'.1 fun i => congr_arg Subtype.val (hgl' i)
[GOAL]
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
⊢ Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x ⟶ T x
[PROOFSTEP]
refine'
  colimit.desc _
    { pt := T x
      ι :=
        { app := fun U f => _
          naturality := _ } }
[GOAL]
case refine'_1
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
f :
  (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
        (Sheaf.presheaf (subsheafToTypes P))).obj
    U
⊢ ((Functor.const (OpenNhds x)ᵒᵖ).obj (T x)).obj U
[PROOFSTEP]
exact f.1 ⟨x, (unop U).2⟩
[GOAL]
case refine'_2
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
⊢ ∀ ⦃X_1 Y : (OpenNhds x)ᵒᵖ⦄ (f : X_1 ⟶ Y),
    (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
              (Sheaf.presheaf (subsheafToTypes P))).map
          f ≫
        (fun U f => ↑f { val := x, property := (_ : x ∈ U.unop.obj) }) Y =
      (fun U f => ↑f { val := x, property := (_ : x ∈ U.unop.obj) }) X_1 ≫
        ((Functor.const (OpenNhds x)ᵒᵖ).obj (T x)).map f
[PROOFSTEP]
aesop
[GOAL]
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
U : Opens ↑X
x : { x // x ∈ U }
f : (Sheaf.presheaf (subsheafToTypes P)).obj (op U)
⊢ stalkToFiber P (↑x) (Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) x f) = ↑f x
[PROOFSTEP]
dsimp [Presheaf.germ, stalkToFiber]
[GOAL]
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
U : Opens ↑X
x : { x // x ∈ U }
f : (Sheaf.presheaf (subsheafToTypes P)).obj (op U)
⊢ colimit.desc ((OpenNhds.inclusion ↑x).op ⋙ subpresheafToTypes P.toPrelocalPredicate)
      { pt := T ↑x, ι := NatTrans.mk fun U_1 f => ↑f { val := ↑x, property := (_ : ↑x ∈ U_1.unop.obj) } }
      (colimit.ι ((OpenNhds.inclusion ↑x).op ⋙ subpresheafToTypes P.toPrelocalPredicate)
        (op { obj := U, property := (_ : ↑x ∈ U) }) f) =
    ↑f x
[PROOFSTEP]
cases x
[GOAL]
case mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
U : Opens ↑X
f : (Sheaf.presheaf (subsheafToTypes P)).obj (op U)
val✝ : ↑X
property✝ : val✝ ∈ U
⊢ colimit.desc
      ((OpenNhds.inclusion ↑{ val := val✝, property := property✝ }).op ⋙ subpresheafToTypes P.toPrelocalPredicate)
      { pt := T ↑{ val := val✝, property := property✝ },
        ι :=
          NatTrans.mk fun U_1 f =>
            ↑f
              { val := ↑{ val := val✝, property := property✝ },
                property := (_ : ↑{ val := val✝, property := property✝ } ∈ U_1.unop.obj) } }
      (colimit.ι
        ((OpenNhds.inclusion ↑{ val := val✝, property := property✝ }).op ⋙ subpresheafToTypes P.toPrelocalPredicate)
        (op { obj := U, property := (_ : ↑{ val := val✝, property := property✝ } ∈ U) }) f) =
    ↑f { val := val✝, property := property✝ }
[PROOFSTEP]
simp
[GOAL]
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t
t : T x
⊢ ∃ a, stalkToFiber P x a = t
[PROOFSTEP]
rcases w t with ⟨U, f, h, rfl⟩
[GOAL]
case intro.intro.intro
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t
U : OpenNhds x
f : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y
h : PrelocalPredicate.pred P.toPrelocalPredicate f
⊢ ∃ a, stalkToFiber P x a = f { val := x, property := (_ : x ∈ U.obj) }
[PROOFSTEP]
fconstructor
[GOAL]
case intro.intro.intro.w
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t
U : OpenNhds x
f : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y
h : PrelocalPredicate.pred P.toPrelocalPredicate f
⊢ Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x
[PROOFSTEP]
exact (subsheafToTypes P).presheaf.germ ⟨x, U.2⟩ ⟨f, h⟩
[GOAL]
case intro.intro.intro.h
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t
U : OpenNhds x
f : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y
h : PrelocalPredicate.pred P.toPrelocalPredicate f
⊢ stalkToFiber P x
      (Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ U.obj) }
        { val := f, property := h }) =
    f { val := x, property := (_ : x ∈ U.obj) }
[PROOFSTEP]
exact stalkToFiber_germ _ U.1 ⟨x, U.2⟩ ⟨f, h⟩
[GOAL]
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
tU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x
h : stalkToFiber P x tU = stalkToFiber P x tV
⊢ tU = tV
[PROOFSTEP]
let Q :
  ∃ (W : (OpenNhds x)ᵒᵖ) (s : ∀ w : (unop W).1, T w) (hW : P.pred s),
    tU = (subsheafToTypes P).presheaf.germ ⟨x, (unop W).2⟩ ⟨s, hW⟩ ∧
      tV = (subsheafToTypes P).presheaf.germ ⟨x, (unop W).2⟩ ⟨s, hW⟩ :=
  ?_
[GOAL]
case refine_2
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
tU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x
h : stalkToFiber P x tU = stalkToFiber P x tV
Q : ∃ W s hW,
  tU =
      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
        { val := s, property := hW } ∧
    tV =
      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
        { val := s, property := hW } :=
  ?refine_1
⊢ tU = tV
[PROOFSTEP]
choose W s hW e using Q
[GOAL]
case refine_2
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
tU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x
h : stalkToFiber P x tU = stalkToFiber P x tV
W : (OpenNhds x)ᵒᵖ
s : (w : { x_1 // x_1 ∈ W.unop.obj }) → T ↑w
hW : PrelocalPredicate.pred P.toPrelocalPredicate s
e :
  tU =
      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
        { val := s, property := hW } ∧
    tV =
      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
        { val := s, property := hW }
⊢ tU = tV
[PROOFSTEP]
exact e.1.trans e.2.symm
[GOAL]
case refine_1
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
tU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x
h : stalkToFiber P x tU = stalkToFiber P x tV
⊢ ∃ W s hW,
    tU =
        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      tV =
        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
obtain ⟨U, ⟨fU, hU⟩, rfl⟩ := jointly_surjective'.{v, v} tU
[GOAL]
case refine_1.intro.intro.mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
h :
  stalkToFiber P x
      (colimit.ι
        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
          (Sheaf.presheaf (subsheafToTypes P)))
        U { val := fU, property := hU }) =
    stalkToFiber P x tV
⊢ ∃ W s hW,
    colimit.ι
          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
            (Sheaf.presheaf (subsheafToTypes P)))
          U { val := fU, property := hU } =
        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      tV =
        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
obtain ⟨V, ⟨fV, hV⟩, rfl⟩ := jointly_surjective'.{v, v} tV
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h :
  stalkToFiber P x
      (colimit.ι
        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
          (Sheaf.presheaf (subsheafToTypes P)))
        U { val := fU, property := hU }) =
    stalkToFiber P x
      (colimit.ι
        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
          (Sheaf.presheaf (subsheafToTypes P)))
        V { val := fV, property := hV })
⊢ ∃ W s hW,
    colimit.ι
          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
            (Sheaf.presheaf (subsheafToTypes P)))
          U { val := fU, property := hU } =
        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      colimit.ι
          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
            (Sheaf.presheaf (subsheafToTypes P)))
          V { val := fV, property := hV } =
        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
dsimp
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h :
  stalkToFiber P x
      (colimit.ι
        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
          (Sheaf.presheaf (subsheafToTypes P)))
        U { val := fU, property := hU }) =
    stalkToFiber P x
      (colimit.ι
        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj
          (Sheaf.presheaf (subsheafToTypes P)))
        V { val := fV, property := hV })
⊢ ∃ W s hW,
    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
simp only [stalkToFiber, Types.Colimit.ι_desc_apply'] at h
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
w :
  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),
    PrelocalPredicate.pred P.toPrelocalPredicate fU →
      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),
        PrelocalPredicate.pred P.toPrelocalPredicate fV →
          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →
            ∃ W iU iV,
              ∀ (w : { x_4 // x_4 ∈ W.obj }),
                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =
                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
⊢ ∃ W s hW,
    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
specialize w (unop U) (unop V) fU hU fV hV h
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
w :
  ∃ W iU iV,
    ∀ (w : { x_1 // x_1 ∈ W.obj }),
      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =
        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)
⊢ ∃ W s hW,
    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
rcases w with
  ⟨W, iU, iV, w⟩
    -- and put it back together again in the correct order.
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
W : OpenNhds x
iU : W ⟶ U.unop
iV : W ⟶ V.unop
w :
  ∀ (w : { x_1 // x_1 ∈ W.obj }),
    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =
      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)
⊢ ∃ W s hW,
    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW } ∧
      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =
        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }
          { val := s, property := hW }
[PROOFSTEP]
refine' ⟨op W, fun w => fU (iU w : (unop U).1), P.res _ _ hU, _⟩
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_1
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
W : OpenNhds x
iU : W ⟶ U.unop
iV : W ⟶ V.unop
w :
  ∀ (w : { x_1 // x_1 ∈ W.obj }),
    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =
      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)
⊢ (op W).unop.obj ⟶ U.unop.obj
case refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_2
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
W : OpenNhds x
iU : W ⟶ U.unop
iV : W ⟶ V.unop
w :
  ∀ (w : { x_1 // x_1 ∈ W.obj }),
    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =
      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)
⊢ colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =
      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }
        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),
          property :=
            (_ :
              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>
                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) } ∧
    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =
      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }
        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),
          property :=
            (_ :
              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>
                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) }
[PROOFSTEP]
rcases W with ⟨W, m⟩
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_1.mk
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
W : Opens ↑X
m : x ∈ W
iU : { obj := W, property := m } ⟶ U.unop
iV : { obj := W, property := m } ⟶ V.unop
w :
  ∀ (w : { x_1 // x_1 ∈ { obj := W, property := m }.obj }),
    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =
      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)
⊢ (op { obj := W, property := m }).unop.obj ⟶ U.unop.obj
[PROOFSTEP]
exact iU
[GOAL]
case refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_2
X : TopCat
T : ↑X → Type v
P : LocalPredicate T
x : ↑X
U : (OpenNhds x)ᵒᵖ
fU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1
hU : PrelocalPredicate.pred P.toPrelocalPredicate fU
V : (OpenNhds x)ᵒᵖ
fV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1
hV : PrelocalPredicate.pred P.toPrelocalPredicate fV
h : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }
W : OpenNhds x
iU : W ⟶ U.unop
iV : W ⟶ V.unop
w :
  ∀ (w : { x_1 // x_1 ∈ W.obj }),
    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =
      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)
⊢ colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =
      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }
        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),
          property :=
            (_ :
              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>
                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) } ∧
    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =
      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }
        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),
          property :=
            (_ :
              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>
                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) }
[PROOFSTEP]
exact ⟨colimit_sound iU.op (Subtype.eq rfl), colimit_sound iV.op (Subtype.eq (funext w).symm)⟩
[GOAL]
X✝ : TopCat
T✝ : ↑X✝ → Type v
T : TopCat
X : (Opens ↑X✝)ᵒᵖ
⊢ (subpresheafToTypes (continuousPrelocal X✝ T)).obj X ⟶ (presheafToTop X✝ T).obj X
[PROOFSTEP]
rintro ⟨f, c⟩
[GOAL]
case mk
X✝ : TopCat
T✝ : ↑X✝ → Type v
T : TopCat
X : (Opens ↑X✝)ᵒᵖ
f : (x : { x // x ∈ X.unop }) → (fun x => ↑T) ↑x
c : PrelocalPredicate.pred (continuousPrelocal X✝ T) f
⊢ (presheafToTop X✝ T).obj X
[PROOFSTEP]
exact ⟨f, c⟩
[GOAL]
X✝ : TopCat
T✝ : ↑X✝ → Type v
T : TopCat
X : (Opens ↑X✝)ᵒᵖ
⊢ (presheafToTop X✝ T).obj X ⟶ (subpresheafToTypes (continuousPrelocal X✝ T)).obj X
[PROOFSTEP]
rintro ⟨f, c⟩
[GOAL]
case mk
X✝ : TopCat
T✝ : ↑X✝ → Type v
T : TopCat
X : (Opens ↑X✝)ᵒᵖ
f : ↑((Opens.toTopCat X✝).op.obj X).unop → ↑T
c : Continuous f
⊢ (subpresheafToTypes (continuousPrelocal X✝ T)).obj X
[PROOFSTEP]
exact ⟨f, c⟩


[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (G.obj (op U))
⊢ ∀ {Y Z : C} {f_1 : Y ⟶ U},
    (fun V i => ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s) Y f_1 →
      ∀ (g : Z ⟶ Y), (fun V i => ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s) Z (g ≫ f_1)
[PROOFSTEP]
rintro V W i ⟨t, ht⟩ j
[GOAL]
case intro
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (G.obj (op U))
V W : C
i : V ⟶ U
t : (forget A).obj (F.obj (op V))
ht : ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s
j : W ⟶ V
⊢ ∃ t, ↑(NatTrans.app f (op W)) t = ↑(G.map (j ≫ i).op) s
[PROOFSTEP]
refine' ⟨F.map j.op t, _⟩
[GOAL]
case intro
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (G.obj (op U))
V W : C
i : V ⟶ U
t : (forget A).obj (F.obj (op V))
ht : ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s
j : W ⟶ V
⊢ ↑(NatTrans.app f (op W)) (↑(F.map j.op) t) = ↑(G.map (j ≫ i).op) s
[PROOFSTEP]
rw [op_comp, G.map_comp, comp_apply, ← ht, elementwise_of% f.naturality]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (F.obj (op U))
⊢ imageSieve f (↑(NatTrans.app f (op U)) s) = ⊤
[PROOFSTEP]
ext V i
[GOAL]
case h
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (F.obj (op U))
V : C
i : V ⟶ U
⊢ (imageSieve f (↑(NatTrans.app f (op U)) s)).arrows i ↔ ⊤.arrows i
[PROOFSTEP]
simp only [Sieve.top_apply, iff_true_iff, imageSieve_apply]
[GOAL]
case h
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (F.obj (op U))
V : C
i : V ⟶ U
⊢ ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) (↑(NatTrans.app f (op U)) s)
[PROOFSTEP]
have := elementwise_of% (f.naturality i.op)
[GOAL]
case h
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
U : C
s : (forget A).obj (F.obj (op U))
V : C
i : V ⟶ U
this :
  ∀ (x : (forget A).obj (F.obj (op U))),
    ↑(NatTrans.app f (op V)) (↑(F.map i.op) x) = ↑(G.map i.op) (↑(NatTrans.app f (op U)) x)
⊢ ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) (↑(NatTrans.app f (op U)) s)
[PROOFSTEP]
exact ⟨F.map i.op s, this s⟩
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ IsLocallySurjective J f ↔ Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A))) = ⊤
[PROOFSTEP]
simp only [Subpresheaf.ext_iff, Function.funext_iff, Set.ext_iff, top_subpresheaf_obj, Set.top_eq_univ, Set.mem_univ,
  iff_true_iff]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ IsLocallySurjective J f ↔
    ∀ (a : Cᵒᵖ) (x : (G ⋙ forget A).obj a),
      x ∈ Subpresheaf.obj (Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A)))) a
[PROOFSTEP]
exact ⟨fun H U => H (unop U), fun H U => H (op U)⟩
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ Type w
f : F ⟶ G
⊢ IsLocallySurjective J f ↔ Subpresheaf.sheafify J (imagePresheaf f) = ⊤
[PROOFSTEP]
simp only [Subpresheaf.ext_iff, Function.funext_iff, Set.ext_iff, top_subpresheaf_obj, Set.top_eq_univ, Set.mem_univ,
  iff_true_iff]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ Type w
f : F ⟶ G
⊢ IsLocallySurjective J f ↔ ∀ (a : Cᵒᵖ) (x : G.obj a), x ∈ Subpresheaf.obj (Subpresheaf.sheafify J (imagePresheaf f)) a
[PROOFSTEP]
exact ⟨fun H U => H (unop U), fun H U => H (op U)⟩
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Sheaf J (Type w)
f : F ⟶ G
⊢ IsLocallySurjective J f.val ↔ IsIso (imageSheafι f)
[PROOFSTEP]
rw [imageSheafι, isLocallySurjective_iff_imagePresheaf_sheafify_eq_top', Subpresheaf.eq_top_iff_isIso]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Sheaf J (Type w)
f : F ⟶ G
⊢ IsIso (Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf f.val))) ↔
    IsIso { val := Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf f.val)) }
[PROOFSTEP]
exact
  ⟨fun h => @isIso_of_reflects_iso _ _ _ _ _ _ (imageSheafι f) (sheafToPresheaf J _) h _, fun h =>
    @Functor.map_isIso _ _ _ _ _ _ (sheafToPresheaf J _) _ h⟩
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ IsLocallySurjective J f ↔ IsLocallySurjective J (whiskerRight f (forget A))
[PROOFSTEP]
simp only [isLocallySurjective_iff_imagePresheaf_sheafify_eq_top]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A))) = ⊤ ↔
    Subpresheaf.sheafify J (imagePresheaf (whiskerRight (whiskerRight f (forget A)) (forget (Type w')))) = ⊤
[PROOFSTEP]
rfl
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
H : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)
⊢ IsLocallySurjective J f
[PROOFSTEP]
intro U s
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
H : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)
U : C
s : (forget A).obj (G.obj (op U))
⊢ imageSieve f s ∈ sieves J U
[PROOFSTEP]
obtain ⟨t, rfl⟩ := H _ s
[GOAL]
case intro
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
H : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)
U : C
t : (forget A).obj (F.obj (op U))
⊢ imageSieve f (↑(NatTrans.app f (op U)) t) ∈ sieves J U
[PROOFSTEP]
rw [imageSieve_app]
[GOAL]
case intro
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
H : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)
U : C
t : (forget A).obj (F.obj (op U))
⊢ ⊤ ∈ sieves J U
[PROOFSTEP]
exact J.top_mem _
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
inst✝ : IsIso f
⊢ IsLocallySurjective J f
[PROOFSTEP]
apply isLocallySurjective_of_surjective
[GOAL]
case H
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
inst✝ : IsIso f
⊢ ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)
[PROOFSTEP]
intro U
[GOAL]
case H
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
inst✝ : IsIso f
U : Cᵒᵖ
⊢ Function.Surjective ↑(NatTrans.app f U)
[PROOFSTEP]
apply Function.Bijective.surjective
[GOAL]
case H.hf
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
inst✝ : IsIso f
U : Cᵒᵖ
⊢ Function.Bijective ↑(NatTrans.app f U)
[PROOFSTEP]
rw [← isIso_iff_bijective, ← forget_map_eq_coe]
[GOAL]
case H.hf
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
inst✝ : IsIso f
U : Cᵒᵖ
⊢ IsIso ((forget A).map (NatTrans.app f U))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
⊢ IsLocallySurjective J (f₁ ≫ f₂)
[PROOFSTEP]
intro U s
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
⊢ imageSieve (f₁ ≫ f₂) s ∈ sieves J U
[PROOFSTEP]
have : (Sieve.bind (imageSieve f₂ s) fun _ _ h => imageSieve f₁ h.choose) ≤ imageSieve (f₁ ≫ f₂) s :=
  by
  rintro V i ⟨W, i, j, H, ⟨t', ht'⟩, rfl⟩
  refine' ⟨t', _⟩
  rw [op_comp, F₃.map_comp, NatTrans.comp_app, comp_apply, comp_apply, ht', elementwise_of% f₂.naturality,
    H.choose_spec]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
⊢ (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s
[PROOFSTEP]
rintro V i ⟨W, i, j, H, ⟨t', ht'⟩, rfl⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
V W : C
i : V ⟶ W
j : W ⟶ U
H : (imageSieve f₂ s).arrows j
t' : (forget A).obj (F₁.obj (op V))
ht' : ↑(NatTrans.app f₁ (op V)) t' = ↑(F₂.map i.op) (Exists.choose H)
⊢ (imageSieve (f₁ ≫ f₂) s).arrows (i ≫ j)
[PROOFSTEP]
refine' ⟨t', _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
V W : C
i : V ⟶ W
j : W ⟶ U
H : (imageSieve f₂ s).arrows j
t' : (forget A).obj (F₁.obj (op V))
ht' : ↑(NatTrans.app f₁ (op V)) t' = ↑(F₂.map i.op) (Exists.choose H)
⊢ ↑(NatTrans.app (f₁ ≫ f₂) (op V)) t' = ↑(F₃.map (i ≫ j).op) s
[PROOFSTEP]
rw [op_comp, F₃.map_comp, NatTrans.comp_app, comp_apply, comp_apply, ht', elementwise_of% f₂.naturality, H.choose_spec]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
this : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s
⊢ imageSieve (f₁ ≫ f₂) s ∈ sieves J U
[PROOFSTEP]
apply J.superset_covering this
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
this : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s
⊢ (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ∈ sieves J U
[PROOFSTEP]
apply J.bind_covering
[GOAL]
case hS
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
this : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s
⊢ imageSieve f₂ s ∈ sieves J U
[PROOFSTEP]
apply h₂
[GOAL]
case hR
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
this : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s
⊢ ∀ ⦃Y : C⦄ ⦃f : Y ⟶ U⦄ (H : (imageSieve f₂ s).arrows f), imageSieve f₁ (Exists.choose H) ∈ sieves J Y
[PROOFSTEP]
intros
[GOAL]
case hR
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
h₁ : IsLocallySurjective J f₁
h₂ : IsLocallySurjective J f₂
U : C
s : (forget A).obj (F₃.obj (op U))
this : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s
Y✝ : C
f✝ : Y✝ ⟶ U
H✝ : (imageSieve f₂ s).arrows f✝
⊢ imageSieve f₁ (Exists.choose H✝) ∈ sieves J Y✝
[PROOFSTEP]
apply h₁
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F : Cᵒᵖ ⥤ Type (max u v)
⊢ toSheafify J F ≫
      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))
          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫
        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =
    toSheafify J F ≫ 𝟙 (sheafify J F)
[PROOFSTEP]
simp [toImagePresheafSheafify]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F : Cᵒᵖ ⥤ Type (max u v)
⊢ Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫
      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))
        (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) =
    𝟙 (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))
[PROOFSTEP]
rw [← cancel_mono (Subpresheaf.ι _), Category.id_comp, Category.assoc]
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F : Cᵒᵖ ⥤ Type (max u v)
⊢ Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫
      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))
          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫
        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =
    Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F)))
[PROOFSTEP]
refine' Eq.trans _ (Category.comp_id _)
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F : Cᵒᵖ ⥤ Type (max u v)
⊢ Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫
      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))
          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫
        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =
    Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫ 𝟙 (sheafify J F)
[PROOFSTEP]
congr 1
[GOAL]
case e_a
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F : Cᵒᵖ ⥤ Type (max u v)
⊢ sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))
        (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫
      Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =
    𝟙 (sheafify J F)
[PROOFSTEP]
exact J.sheafify_hom_ext _ _ (J.sheafify_isSheaf _) (by simp [toImagePresheafSheafify])
[GOAL]
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F : Cᵒᵖ ⥤ Type (max u v)
⊢ toSheafify J F ≫
      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))
          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫
        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =
    toSheafify J F ≫ 𝟙 (sheafify J F)
[PROOFSTEP]
simp [toImagePresheafSheafify]
[GOAL]
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝⁸ : Category.{v', u'} A
inst✝⁷ : ConcreteCategory A
F✝ : Cᵒᵖ ⥤ Type (max u v)
B : Type w
inst✝⁶ : Category.{max u v, w} B
inst✝⁵ : ConcreteCategory B
inst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B
inst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)
inst✝² :
  (X : C) →
    (W : Cover J X) →
      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)
inst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)
inst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B
F : Cᵒᵖ ⥤ B
⊢ IsLocallySurjective J (toSheafify J F)
[PROOFSTEP]
rw [isLocallySurjective_iff_whisker_forget, ← toSheafify_comp_sheafifyCompIso_inv]
[GOAL]
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝⁸ : Category.{v', u'} A
inst✝⁷ : ConcreteCategory A
F✝ : Cᵒᵖ ⥤ Type (max u v)
B : Type w
inst✝⁶ : Category.{max u v, w} B
inst✝⁵ : ConcreteCategory B
inst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B
inst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)
inst✝² :
  (X : C) →
    (W : Cover J X) →
      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)
inst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)
inst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B
F : Cᵒᵖ ⥤ B
⊢ IsLocallySurjective J (toSheafify J (F ⋙ forget B) ≫ (sheafifyCompIso J (forget B) F).inv)
[PROOFSTEP]
apply IsLocallySurjective.comp
[GOAL]
case h₁
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝⁸ : Category.{v', u'} A
inst✝⁷ : ConcreteCategory A
F✝ : Cᵒᵖ ⥤ Type (max u v)
B : Type w
inst✝⁶ : Category.{max u v, w} B
inst✝⁵ : ConcreteCategory B
inst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B
inst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)
inst✝² :
  (X : C) →
    (W : Cover J X) →
      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)
inst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)
inst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B
F : Cᵒᵖ ⥤ B
⊢ IsLocallySurjective J (toSheafify J (F ⋙ forget B))
[PROOFSTEP]
rw [isLocallySurjective_iff_imagePresheaf_sheafify_eq_top, Subpresheaf.eq_top_iff_isIso]
[GOAL]
case h₁
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝⁸ : Category.{v', u'} A
inst✝⁷ : ConcreteCategory A
F✝ : Cᵒᵖ ⥤ Type (max u v)
B : Type w
inst✝⁶ : Category.{max u v, w} B
inst✝⁵ : ConcreteCategory B
inst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B
inst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)
inst✝² :
  (X : C) →
    (W : Cover J X) →
      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)
inst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)
inst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B
F : Cᵒᵖ ⥤ B
⊢ IsIso
    (Subpresheaf.ι
      (Subpresheaf.sheafify J (imagePresheaf (whiskerRight (toSheafify J (F ⋙ forget B)) (forget (Type (max u v)))))))
[PROOFSTEP]
exact IsIso.of_iso_inv (sheafificationIsoImagePresheaf J (F ⋙ forget B))
[GOAL]
case h₂
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝⁸ : Category.{v', u'} A
inst✝⁷ : ConcreteCategory A
F✝ : Cᵒᵖ ⥤ Type (max u v)
B : Type w
inst✝⁶ : Category.{max u v, w} B
inst✝⁵ : ConcreteCategory B
inst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B
inst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)
inst✝² :
  (X : C) →
    (W : Cover J X) →
      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)
inst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)
inst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B
F : Cᵒᵖ ⥤ B
⊢ IsLocallySurjective J (sheafifyCompIso J (forget B) F).inv
[PROOFSTEP]
exact isLocallySurjective_of_iso _ _


[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
⊢ Function.Injective fun S => S.carrier
[PROOFSTEP]
rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩
[GOAL]
case mk.mk.mk.mk
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
toSubsemiring✝¹ : Subsemiring L
algebraMap_mem'✝¹ : ∀ (r : K), ↑(algebraMap K L) r ∈ toSubsemiring✝¹.carrier
inv_mem'✝¹ :
  ∀ (x : L),
    x ∈
        { toSubsemiring := toSubsemiring✝¹,
                  algebraMap_mem' := algebraMap_mem'✝¹ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      x⁻¹ ∈
        { toSubsemiring := toSubsemiring✝¹,
                  algebraMap_mem' := algebraMap_mem'✝¹ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
toSubsemiring✝ : Subsemiring L
algebraMap_mem'✝ : ∀ (r : K), ↑(algebraMap K L) r ∈ toSubsemiring✝.carrier
inv_mem'✝ :
  ∀ (x : L),
    x ∈
        { toSubsemiring := toSubsemiring✝,
                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      x⁻¹ ∈
        { toSubsemiring := toSubsemiring✝,
                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
⊢ (fun S => S.carrier)
        { toSubalgebra := { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ },
          inv_mem' := inv_mem'✝¹ } =
      (fun S => S.carrier)
        { toSubalgebra := { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ },
          inv_mem' := inv_mem'✝ } →
    { toSubalgebra := { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ },
        inv_mem' := inv_mem'✝¹ } =
      { toSubalgebra := { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ },
        inv_mem' := inv_mem'✝ }
[PROOFSTEP]
simp
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : L
hx : x ∈ S
⊢ -x ∈ S
[PROOFSTEP]
show -x ∈ S.toSubalgebra
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : L
hx : x ∈ S
⊢ -x ∈ S.toSubalgebra
[PROOFSTEP]
simpa
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
n : ℕ
⊢ ↑n ∈ S
[PROOFSTEP]
simpa using coe_int_mem S n
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
inv_mem : ∀ (x : L), x ∈ S → x⁻¹ ∈ S
⊢ (Subalgebra.toIntermediateField S inv_mem).toSubalgebra = S
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
inv_mem : ∀ (x : L), x ∈ S → x⁻¹ ∈ S
x✝ : L
⊢ x✝ ∈ (Subalgebra.toIntermediateField S inv_mem).toSubalgebra ↔ x✝ ∈ S
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S : IntermediateField K L
⊢ Subalgebra.toIntermediateField S.toSubalgebra (_ : ∀ (x : L), x ∈ S → x⁻¹ ∈ S) = S
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S : IntermediateField K L
x✝ : L
⊢ x✝ ∈ Subalgebra.toIntermediateField S.toSubalgebra (_ : ∀ (x : L), x ∈ S → x⁻¹ ∈ S) ↔ x✝ ∈ S
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
⊢ x⁻¹ ∈ S
[PROOFSTEP]
by_cases hx0 : x = 0
[GOAL]
case pos
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
hx0 : x = 0
⊢ x⁻¹ ∈ S
[PROOFSTEP]
rw [hx0, inv_zero]
[GOAL]
case pos
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
hx0 : x = 0
⊢ 0 ∈ S
[PROOFSTEP]
exact S.zero_mem
[GOAL]
case neg
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
hx0 : ¬x = 0
⊢ x⁻¹ ∈ S
[PROOFSTEP]
letI hS' := hS.toField
[GOAL]
case neg
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
hx0 : ¬x = 0
hS' : Field { x // x ∈ S } := IsField.toField hS
⊢ x⁻¹ ∈ S
[PROOFSTEP]
obtain ⟨y, hy⟩ := hS.mul_inv_cancel (show (⟨x, hx⟩ : S) ≠ 0 from Subtype.ne_of_val_ne hx0)
[GOAL]
case neg.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
hx0 : ¬x = 0
hS' : Field { x // x ∈ S } := IsField.toField hS
y : { x // x ∈ S }
hy : { val := x, property := hx } * y = 1
⊢ x⁻¹ ∈ S
[PROOFSTEP]
rw [Subtype.ext_iff, S.coe_mul, S.coe_one, Subtype.coe_mk, mul_eq_one_iff_inv_eq₀ hx0] at hy
[GOAL]
case neg.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x : L
hx : x ∈ S
hx0 : ¬x = 0
hS' : Field { x // x ∈ S } := IsField.toField hS
y : { x // x ∈ S }
hy : x⁻¹ = ↑y
⊢ x⁻¹ ∈ S
[PROOFSTEP]
exact hy.symm ▸ y.2
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
⊢ (Subalgebra.toIntermediateField' S hS).toSubalgebra = S
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x✝ : L
⊢ x✝ ∈ (Subalgebra.toIntermediateField' S hS).toSubalgebra ↔ x✝ ∈ S
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S : IntermediateField K L
⊢ Subalgebra.toIntermediateField' S.toSubalgebra (_ : IsField { x // x ∈ S }) = S
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S : IntermediateField K L
x✝ : L
⊢ x✝ ∈ Subalgebra.toIntermediateField' S.toSubalgebra (_ : IsField { x // x ∈ S }) ↔ x✝ ∈ S
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∑ i : ι, f i) = ∑ i : ι, ↑(f i)
[PROOFSTEP]
classical
induction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H
· simp
· rw [Finset.sum_insert hi, AddMemClass.coe_add, H, Finset.sum_insert hi]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∑ i : ι, f i) = ∑ i : ι, ↑(f i)
[PROOFSTEP]
induction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H
[GOAL]
case empty
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∑ i in ∅, f i) = ∑ i in ∅, ↑(f i)
[PROOFSTEP]
simp
[GOAL]
case insert
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
i : ι
s : Finset ι
hi : ¬i ∈ s
H : ↑(∑ i in s, f i) = ∑ i in s, ↑(f i)
⊢ ↑(∑ i in insert i s, f i) = ∑ i in insert i s, ↑(f i)
[PROOFSTEP]
rw [Finset.sum_insert hi, AddMemClass.coe_add, H, Finset.sum_insert hi]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∏ i : ι, f i) = ∏ i : ι, ↑(f i)
[PROOFSTEP]
classical
induction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H
· simp
· rw [Finset.prod_insert hi, MulMemClass.coe_mul, H, Finset.prod_insert hi]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∏ i : ι, f i) = ∏ i : ι, ↑(f i)
[PROOFSTEP]
induction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H
[GOAL]
case empty
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∏ i in ∅, f i) = ∏ i in ∅, ↑(f i)
[PROOFSTEP]
simp
[GOAL]
case insert
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_4
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
i : ι
s : Finset ι
hi : ¬i ∈ s
H : ↑(∏ i in s, f i) = ∏ i in s, ↑(f i)
⊢ ↑(∏ i in insert i s, f i) = ∏ i in insert i s, ↑(f i)
[PROOFSTEP]
rw [Finset.prod_insert hi, MulMemClass.coe_mul, H, Finset.prod_insert hi]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
f : L →ₐ[K] L'
S : IntermediateField K L
src✝ : Subalgebra K L' := Subalgebra.map f S.toSubalgebra
⊢ ∀ (x : L'),
    x ∈
        { toSubsemiring := src✝.toSubsemiring,
                  algebraMap_mem' :=
                    (_ :
                      ∀ (r : K),
                        ↑(algebraMap K L') r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      x⁻¹ ∈
        { toSubsemiring := src✝.toSubsemiring,
                  algebraMap_mem' :=
                    (_ :
                      ∀ (r : K), ↑(algebraMap K L') r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rintro _ ⟨x, hx, rfl⟩
[GOAL]
case intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
f : L →ₐ[K] L'
S : IntermediateField K L
src✝ : Subalgebra K L' := Subalgebra.map f S.toSubalgebra
x : L
hx : x ∈ ↑S.toSubsemiring
⊢ (↑↑f x)⁻¹ ∈
    { toSubsemiring := src✝.toSubsemiring,
              algebraMap_mem' :=
                (_ : ∀ (r : K), ↑(algebraMap K L') r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
exact ⟨x⁻¹, S.inv_mem hx, map_inv₀ f x⟩
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
⊢ ↑(aeval ↑x) P = ↑(↑(aeval x) P)
[PROOFSTEP]
refine' Polynomial.induction_on' P (fun f g hf hg => _) fun n r => _
[GOAL]
case refine'_1
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P f g : R[X]
hf : ↑(aeval ↑x) f = ↑(↑(aeval x) f)
hg : ↑(aeval ↑x) g = ↑(↑(aeval x) g)
⊢ ↑(aeval ↑x) (f + g) = ↑(↑(aeval x) (f + g))
[PROOFSTEP]
rw [aeval_add, aeval_add, AddMemClass.coe_add, hf, hg]
[GOAL]
case refine'_2
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
n : ℕ
r : R
⊢ ↑(aeval ↑x) (↑(monomial n) r) = ↑(↑(aeval x) (↑(monomial n) r))
[PROOFSTEP]
simp only [MulMemClass.coe_mul, aeval_monomial, SubmonoidClass.coe_pow, mul_eq_mul_right_iff]
[GOAL]
case refine'_2
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
n : ℕ
r : R
⊢ ↑(algebraMap R L) r = ↑(↑(algebraMap R { x // x ∈ S }) r) ∨ ↑x ^ n = 0
[PROOFSTEP]
left
[GOAL]
case refine'_2.h
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
n : ℕ
r : R
⊢ ↑(algebraMap R L) r = ↑(↑(algebraMap R { x // x ∈ S }) r)
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
⊢ IsIntegral R ↑x ↔ IsIntegral R x
[PROOFSTEP]
refine' ⟨fun h => _, fun h => _⟩
[GOAL]
case refine'_1
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
h : IsIntegral R ↑x
⊢ IsIntegral R x
[PROOFSTEP]
obtain ⟨P, hPmo, hProot⟩ := h
[GOAL]
case refine'_1.intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
hPmo : Monic P
hProot : eval₂ (algebraMap R L) (↑x) P = 0
⊢ IsIntegral R x
[PROOFSTEP]
refine' ⟨P, hPmo, (injective_iff_map_eq_zero _).1 (algebraMap (↥S) L).injective _ _⟩
[GOAL]
case refine'_1.intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
hPmo : Monic P
hProot : eval₂ (algebraMap R L) (↑x) P = 0
⊢ ↑(algebraMap { x // x ∈ S } L) (eval₂ (algebraMap R { x // x ∈ S }) x P) = 0
[PROOFSTEP]
letI : IsScalarTower R S L := IsScalarTower.of_algebraMap_eq (congr_fun rfl)
[GOAL]
case refine'_1.intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
hPmo : Monic P
hProot : eval₂ (algebraMap R L) (↑x) P = 0
this : IsScalarTower R { x // x ∈ S } L := IsScalarTower.of_algebraMap_eq (congr_fun rfl)
⊢ ↑(algebraMap { x // x ∈ S } L) (eval₂ (algebraMap R { x // x ∈ S }) x P) = 0
[PROOFSTEP]
rw [eval₂_eq_eval_map, ← eval₂_at_apply, eval₂_eq_eval_map, Polynomial.map_map, ←
  --Porting note: very strange that I have to `rw` twice with `eval₂_eq_eval_map`.
        -- The first `rw` does nothingIsScalarTower.algebraMap_eq, ← eval₂_eq_eval_map, ← eval₂_eq_eval_map]
[GOAL]
case refine'_1.intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
hPmo : Monic P
hProot : eval₂ (algebraMap R L) (↑x) P = 0
this : IsScalarTower R { x // x ∈ S } L := IsScalarTower.of_algebraMap_eq (congr_fun rfl)
⊢ eval₂ (algebraMap R L) (↑(algebraMap { x // x ∈ S } L) x) P = 0
[PROOFSTEP]
exact hProot
[GOAL]
case refine'_2
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
h : IsIntegral R x
⊢ IsIntegral R ↑x
[PROOFSTEP]
obtain ⟨P, hPmo, hProot⟩ := h
[GOAL]
case refine'_2.intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
hPmo : Monic P
hProot : eval₂ (algebraMap R { x // x ∈ S }) x P = 0
⊢ IsIntegral R ↑x
[PROOFSTEP]
refine' ⟨P, hPmo, _⟩
[GOAL]
case refine'_2.intro.intro
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field L'
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K L'
S : IntermediateField K L
R : Type u_4
inst✝³ : CommRing R
inst✝² : Algebra R K
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : { x // x ∈ S }
P : R[X]
hPmo : Monic P
hProot : eval₂ (algebraMap R { x // x ∈ S }) x P = 0
⊢ eval₂ (algebraMap R L) (↑x) P = 0
[PROOFSTEP]
rw [← aeval_def, aeval_coe, aeval_def, hProot, ZeroMemClass.coe_zero]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S S' : IntermediateField K L
h : S.toSubalgebra = S'.toSubalgebra
⊢ S = S'
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S S' : IntermediateField K L
h : S.toSubalgebra = S'.toSubalgebra
x✝ : L
⊢ x✝ ∈ S ↔ x✝ ∈ S'
[PROOFSTEP]
rw [← mem_toSubalgebra, ← mem_toSubalgebra, h]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : L
hx : x ∈ RingHom.fieldRange (algebraMap K L)
⊢ x ∈ Set.range ↑(algebraMap K L)
[PROOFSTEP]
rwa [Set.mem_range, ← RingHom.mem_fieldRange]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁶ : Field K
inst✝⁵ : Field L
inst✝⁴ : Field L'
inst✝³ : Algebra K L
inst✝² : Algebra K L'
S : IntermediateField K L
inst✝¹ : Algebra L' L
inst✝ : IsScalarTower K L' L
U V : IntermediateField L' L
H : restrictScalars K U = restrictScalars K V
x : L
⊢ x ∈ U ↔ x ∈ V
[PROOFSTEP]
rw [← mem_restrictScalars K, H, mem_restrictScalars]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F : IntermediateField K L
E : IntermediateField { x // x ∈ F } L
⊢ Algebra K { x // x ∈ E }
[PROOFSTEP]
infer_instance
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F E : IntermediateField K L
⊢ F.toSubalgebra = E.toSubalgebra ↔ F = E
[PROOFSTEP]
rw [SetLike.ext_iff, SetLike.ext'_iff, Set.ext_iff]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F E : IntermediateField K L
⊢ (∀ (x : L), x ∈ F.toSubalgebra ↔ x ∈ E.toSubalgebra) ↔ ∀ (x : L), x ∈ ↑F ↔ x ∈ ↑E
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S F E : IntermediateField K L
inst✝ : FiniteDimensional K L
h_le : F ≤ E
h_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L
⊢ F = E
[PROOFSTEP]
apply eq_of_le_of_finrank_le h_le
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S F E : IntermediateField K L
inst✝ : FiniteDimensional K L
h_le : F ≤ E
h_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L
⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }
[PROOFSTEP]
have h1 := finrank_mul_finrank K F L
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S F E : IntermediateField K L
inst✝ : FiniteDimensional K L
h_le : F ≤ E
h_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L
h1 : finrank K { x // x ∈ F } * finrank { x // x ∈ F } L = finrank K L
⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }
[PROOFSTEP]
have h2 := finrank_mul_finrank K E L
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S F E : IntermediateField K L
inst✝ : FiniteDimensional K L
h_le : F ≤ E
h_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L
h1 : finrank K { x // x ∈ F } * finrank { x // x ∈ F } L = finrank K L
h2 : finrank K { x // x ∈ E } * finrank { x // x ∈ E } L = finrank K L
⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }
[PROOFSTEP]
have h3 : 0 < finrank E L := finrank_pos
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S F E : IntermediateField K L
inst✝ : FiniteDimensional K L
h_le : F ≤ E
h_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L
h1 : finrank K { x // x ∈ F } * finrank { x // x ∈ F } L = finrank K L
h2 : finrank K { x // x ∈ E } * finrank { x // x ∈ E } L = finrank K L
h3 : 0 < finrank { x // x ∈ E } L
⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }
[PROOFSTEP]
nlinarith
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : { x // x ∈ S }
⊢ IsIntegral K x ↔ IsIntegral K ↑x
[PROOFSTEP]
rw [← isAlgebraic_iff_isIntegral, isAlgebraic_iff, isAlgebraic_iff_isIntegral]
[GOAL]
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : { x // x ∈ S }
⊢ minpoly K x = minpoly K ↑x
[PROOFSTEP]
by_cases hx : IsIntegral K x
[GOAL]
case pos
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : { x // x ∈ S }
hx : IsIntegral K x
⊢ minpoly K x = minpoly K ↑x
[PROOFSTEP]
exact minpoly.eq_of_algebraMap_eq (algebraMap S L).injective hx rfl
[GOAL]
case neg
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : { x // x ∈ S }
hx : ¬IsIntegral K x
⊢ minpoly K x = minpoly K ↑x
[PROOFSTEP]
exact (minpoly.eq_zero hx).trans (minpoly.eq_zero (mt isIntegral_iff.mpr hx)).symm


[GOAL]
X : Scheme
⊢ Continuous fun x => PEmpty.elim x
[PROOFSTEP]
continuity
[GOAL]
X : Scheme
f g : ∅ ⟶ X
⊢ f.val.base = g.val.base
[PROOFSTEP]
ext a
[GOAL]
case w
X : Scheme
f g : ∅ ⟶ X
a : (forget TopCat).obj ↑∅.toPresheafedSpace
⊢ ↑f.val.base a = ↑g.val.base a
[PROOFSTEP]
exact PEmpty.elim a
[GOAL]
X : Scheme
f g : ∅ ⟶ X
a : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ
⊢ NatTrans.app (f.val.c ≫ whiskerRight (eqToHom (_ : (Opens.map f.val.base).op = (Opens.map g.val.base).op)) ∅.presheaf)
      a =
    NatTrans.app g.val.c a
[PROOFSTEP]
aesop_cat
[GOAL]
⊢ IsEmpty PEmpty
[PROOFSTEP]
infer_instance
[GOAL]
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
⊢ IsOpenImmersion f
[PROOFSTEP]
apply (config := { allowSynthFailures := true }) IsOpenImmersion.of_stalk_iso
[GOAL]
case hf
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
⊢ OpenEmbedding ↑f.val.base
[PROOFSTEP]
apply openEmbedding_of_continuous_injective_open
[GOAL]
case hf.h₁
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
⊢ Continuous ↑f.val.base
[PROOFSTEP]
continuity
[GOAL]
case hf.h₂
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
⊢ Function.Injective ↑f.val.base
[PROOFSTEP]
rintro (i : X.carrier)
[GOAL]
case hf.h₂
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
i : ↑↑X.toPresheafedSpace
⊢ ∀ ⦃a₂ : (forget TopCat).obj ↑X.toPresheafedSpace⦄, ↑f.val.base i = ↑f.val.base a₂ → i = a₂
[PROOFSTEP]
exact isEmptyElim i
[GOAL]
case hf.h₃
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
⊢ IsOpenMap ↑f.val.base
[PROOFSTEP]
intro U _
[GOAL]
case hf.h₃
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
U : Set ((forget TopCat).obj ↑X.toPresheafedSpace)
a✝ : IsOpen U
⊢ IsOpen (↑f.val.base '' U)
[PROOFSTEP]
convert isOpen_empty (α := Y)
[GOAL]
case h.e'_3.h
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
U : Set ((forget TopCat).obj ↑X.toPresheafedSpace)
a✝ : IsOpen U
e_1✝ : (forget TopCat).obj ↑Y.toPresheafedSpace = ↑↑Y.toPresheafedSpace
⊢ ↑f.val.base '' U = ∅
[PROOFSTEP]
ext
[GOAL]
case h.e'_3.h.h
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
U : Set ((forget TopCat).obj ↑X.toPresheafedSpace)
a✝ : IsOpen U
e_1✝ : (forget TopCat).obj ↑Y.toPresheafedSpace = ↑↑Y.toPresheafedSpace
x✝ : (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ x✝ ∈ ↑f.val.base '' U ↔ x✝ ∈ ∅
[PROOFSTEP]
rw [Set.mem_empty_iff_false, iff_false_iff]
[GOAL]
case h.e'_3.h.h
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
U : Set ((forget TopCat).obj ↑X.toPresheafedSpace)
a✝ : IsOpen U
e_1✝ : (forget TopCat).obj ↑Y.toPresheafedSpace = ↑↑Y.toPresheafedSpace
x✝ : (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ ¬x✝ ∈ ↑f.val.base '' U
[PROOFSTEP]
exact fun x => isEmptyElim (show X.carrier from x.choose)
[GOAL]
case inst
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
⊢ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)
[PROOFSTEP]
rintro (i : X.carrier)
[GOAL]
case inst
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑X.toPresheafedSpace
i : ↑↑X.toPresheafedSpace
⊢ IsIso (PresheafedSpace.stalkMap f.val i)
[PROOFSTEP]
exact isEmptyElim i
[GOAL]
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑Y.toPresheafedSpace
⊢ IsIso f
[PROOFSTEP]
haveI : IsEmpty X.carrier := ⟨fun x => isEmptyElim (show Y.carrier from f.1.base x)⟩
[GOAL]
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑Y.toPresheafedSpace
this : IsEmpty ↑↑X.toPresheafedSpace
⊢ IsIso f
[PROOFSTEP]
have : Epi f.1.base
[GOAL]
case this
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑Y.toPresheafedSpace
this : IsEmpty ↑↑X.toPresheafedSpace
⊢ Epi f.val.base
[PROOFSTEP]
rw [TopCat.epi_iff_surjective]
[GOAL]
case this
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑Y.toPresheafedSpace
this : IsEmpty ↑↑X.toPresheafedSpace
⊢ Function.Surjective ↑f.val.base
[PROOFSTEP]
rintro (x : Y.carrier)
[GOAL]
case this
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑Y.toPresheafedSpace
this : IsEmpty ↑↑X.toPresheafedSpace
x : ↑↑Y.toPresheafedSpace
⊢ ∃ a, ↑f.val.base a = x
[PROOFSTEP]
exact isEmptyElim x
[GOAL]
X Y : Scheme
f : X ⟶ Y
inst✝ : IsEmpty ↑↑Y.toPresheafedSpace
this✝ : IsEmpty ↑↑X.toPresheafedSpace
this : Epi f.val.base
⊢ IsIso f
[PROOFSTEP]
apply IsOpenImmersion.to_iso
[GOAL]
X : Scheme
⊢ IsAffineOpen ⊥
[PROOFSTEP]
convert rangeIsAffineOpenOfOpenImmersion (initial.to X)
[GOAL]
case h.e'_2
X : Scheme
⊢ ⊥ = Scheme.Hom.opensRange (initial.to X)
[PROOFSTEP]
ext
  -- Porting note : added this `erw` to turn LHS to `False`
[GOAL]
case h.e'_2.h.h
X : Scheme
x✝ : ↑↑X.toPresheafedSpace
⊢ x✝ ∈ ↑⊥ ↔ x✝ ∈ ↑(Scheme.Hom.opensRange (initial.to X))
[PROOFSTEP]
erw [Set.mem_empty_iff_false]
[GOAL]
case h.e'_2.h.h
X : Scheme
x✝ : ↑↑X.toPresheafedSpace
⊢ False ↔ x✝ ∈ ↑(Scheme.Hom.opensRange (initial.to X))
[PROOFSTEP]
rw [false_iff_iff]
[GOAL]
case h.e'_2.h.h
X : Scheme
x✝ : ↑↑X.toPresheafedSpace
⊢ ¬x✝ ∈ ↑(Scheme.Hom.opensRange (initial.to X))
[PROOFSTEP]
exact fun x => isEmptyElim (show (⊥_ Scheme).carrier from x.choose)
[GOAL]
A : Scheme
f : A ⟶ ⊥_ Scheme
⊢ IsIso f
[PROOFSTEP]
infer_instance