Theorem: RingHom.PropertyIsLocal.affineLocally_of_comp
File: Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean

tactic: let 𝒰 : ∀ i, ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover := by
  intro i
  refine Scheme.OpenCover.bind ?_ fun i => Scheme.affineCover _
  apply Scheme.OpenCover.pushforwardIso _
    (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom
  apply Scheme.Pullback.openCoverOfRight
  exact (pullback g (Z.affineCover.map i)).affineCover
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
⊢ affineLocally P f
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
⊢ affineLocally P f

tactic: have h𝒰 : ∀ i j, IsAffine ((𝒰 i).obj j) := by dsimp [𝒰]; infer_instance
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
⊢ affineLocally P f
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
⊢ affineLocally P f

tactic: let 𝒰' := (Z.affineCover.pullbackCover g).bind fun i => Scheme.affineCover _
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
⊢ affineLocally P f
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
⊢ affineLocally P f

tactic: have h𝒰' : ∀ i, IsAffine (𝒰'.obj i) := by dsimp [𝒰']; infer_instance
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
⊢ affineLocally P f
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
⊢ affineLocally P f

tactic: rw [hP.affine_openCover_iff f 𝒰' fun i => Scheme.affineCover _]
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
⊢ affineLocally P f
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
⊢ ∀ (i : (𝒰'.pullbackCover f).J) (j : ((𝒰'.pullbackCover f).obj i).affineCover.J),
    P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj i).affineCover.map j ≫ pullback.snd).op)

tactic: rw [hP.affine_openCover_iff (f ≫ g) Z.affineCover 𝒰] at h
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
⊢ ∀ (i : (𝒰'.pullbackCover f).J) (j : ((𝒰'.pullbackCover f).obj i).affineCover.J),
    P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj i).affineCover.map j ≫ pullback.snd).op)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), P (Scheme.Γ.map ((𝒰 i).map j ≫ pullback.snd).op)
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
⊢ ∀ (i : (𝒰'.pullbackCover f).J) (j : ((𝒰'.pullbackCover f).obj i).affineCover.J),
    P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj i).affineCover.map j ≫ pullback.snd).op)

tactic: rintro ⟨i, j⟩ k
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), P (Scheme.Γ.map ((𝒰 i).map j ≫ pullback.snd).op)
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
⊢ ∀ (i : (𝒰'.pullbackCover f).J) (j : ((𝒰'.pullbackCover f).obj i).affineCover.J),
    P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj i).affineCover.map j ≫ pullback.snd).op)
state_after: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), P (Scheme.Γ.map ((𝒰 i).map j ≫ pullback.snd).op)
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : (Z.affineCover.pullbackCover g).J
j : ((fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover) i).J
k : ((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.J
⊢ P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.map k ≫ pullback.snd).op)

tactic: dsimp at i j k
state_before: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), P (Scheme.Γ.map ((𝒰 i).map j ≫ pullback.snd).op)
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : (Z.affineCover.pullbackCover g).J
j : ((fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover) i).J
k : ((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.J
⊢ P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.map k ≫ pullback.snd).op)
state_after: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), P (Scheme.Γ.map ((𝒰 i).map j ≫ pullback.snd).op)
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
⊢ P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.map k ≫ pullback.snd).op)

tactic: specialize h i ⟨j, k⟩
state_before: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), P (Scheme.Γ.map ((𝒰 i).map j ≫ pullback.snd).op)
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
⊢ P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.map k ≫ pullback.snd).op)
state_after: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
h : P (Scheme.Γ.map ((𝒰 i).map ⟨j, k⟩ ≫ pullback.snd).op)
⊢ P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.map k ≫ pullback.snd).op)

tactic: dsimp only [𝒰, 𝒰', Scheme.OpenCover.bind_map, Scheme.OpenCover.pushforwardIso_obj,
  Scheme.Pullback.openCoverOfRight_obj, Scheme.OpenCover.pushforwardIso_map,
  Scheme.Pullback.openCoverOfRight_map, Scheme.OpenCover.bind_obj,
  Scheme.OpenCover.pullbackCover_obj, Scheme.OpenCover.pullbackCover_map] at h ⊢
state_before: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
h : P (Scheme.Γ.map ((𝒰 i).map ⟨j, k⟩ ≫ pullback.snd).op)
⊢ P (Scheme.Γ.map (((𝒰'.pullbackCover f).obj ⟨i, j⟩).affineCover.map k ≫ pullback.snd).op)
state_after: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
h :
  P
    (Scheme.Γ.map
      (((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
            pullback.map f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst) f pullback.fst (𝟙 X)
                ((pullback g (Z.affineCover.map i)).affineCover.map j) (𝟙 Y) ⋯ ⋯ ≫
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom) ≫
          pullback.snd).op)
⊢ P
    (Scheme.Γ.map
      ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
          pullback.snd).op)

tactic: rw [Category.assoc, Category.assoc, pullbackRightPullbackFstIso_hom_snd,
  pullback.lift_snd_assoc, Category.assoc, ← Category.assoc, op_comp, Functor.map_comp] at h
state_before: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
h :
  P
    (Scheme.Γ.map
      (((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
            pullback.map f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst) f pullback.fst (𝟙 X)
                ((pullback g (Z.affineCover.map i)).affineCover.map j) (𝟙 Y) ⋯ ⋯ ≫
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom) ≫
          pullback.snd).op)
⊢ P
    (Scheme.Γ.map
      ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
          pullback.snd).op)
state_after: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
h :
  P
    (Scheme.Γ.map ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.snd).op ≫
      Scheme.Γ.map
        ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
            pullback.snd).op)
⊢ P
    (Scheme.Γ.map
      ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
          pullback.snd).op)

tactic: exact H _ _ h
state_before: case mk
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
h𝒰' : ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
i : Z.affineCover.J
j : (pullback g (Z.affineCover.map i)).affineCover.J
k : (pullback f (𝒰'.map ⟨i, j⟩)).affineCover.J
h :
  P
    (Scheme.Γ.map ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.snd).op ≫
      Scheme.Γ.map
        ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
            pullback.snd).op)
⊢ P
    (Scheme.Γ.map
      ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j ≫ pullback.fst)).affineCover.map k ≫
          pullback.snd).op)
state_after: no goals

tactic: intro i
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
⊢ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
i : (Z.affineCover.pullbackCover (f ≫ g)).J
⊢ ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover

tactic: apply Scheme.OpenCover.pushforwardIso _
  (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
i : (Z.affineCover.pullbackCover (f ≫ g)).J
⊢ ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
i : (Z.affineCover.pullbackCover (f ≫ g)).J
⊢ (pullback f pullback.fst).OpenCover

tactic: apply Scheme.Pullback.openCoverOfRight
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
i : (Z.affineCover.pullbackCover (f ≫ g)).J
⊢ (pullback f pullback.fst).OpenCover
state_after: case 𝒰
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
i : (Z.affineCover.pullbackCover (f ≫ g)).J
⊢ (pullback g (Z.affineCover.map i)).OpenCover

tactic: exact (pullback g (Z.affineCover.map i)).affineCover
state_before: case 𝒰
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
i : (Z.affineCover.pullbackCover (f ≫ g)).J
⊢ (pullback g (Z.affineCover.map i)).OpenCover
state_after: no goals

tactic: dsimp [𝒰]
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
⊢ ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
⊢ ∀ (i : Z.affineCover.J)
    (j :
      (i_1 : (pullback g (Z.affineCover.map i)).affineCover.J) ×
        (pullback f ((pullback g (Z.affineCover.map i)).affineCover.map i_1 ≫ pullback.fst)).affineCover.J),
    IsAffine
      ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j.fst ≫ pullback.fst)).affineCover.obj j.snd)

tactic: infer_instance
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
⊢ ∀ (i : Z.affineCover.J)
    (j :
      (i_1 : (pullback g (Z.affineCover.map i)).affineCover.J) ×
        (pullback f ((pullback g (Z.affineCover.map i)).affineCover.map i_1 ≫ pullback.fst)).affineCover.J),
    IsAffine
      ((pullback f ((pullback g (Z.affineCover.map i)).affineCover.map j.fst ≫ pullback.fst)).affineCover.obj j.snd)
state_after: no goals

tactic: dsimp [𝒰']
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
⊢ ∀ (i : 𝒰'.J), IsAffine (𝒰'.obj i)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
⊢ ∀ (i : (i : Z.affineCover.J) × (pullback g (Z.affineCover.map i)).affineCover.J),
    IsAffine ((pullback g (Z.affineCover.map i.fst)).affineCover.obj i.snd)

tactic: infer_instance
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : PropertyIsLocal P
H :
  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
    P (g.comp f) → P g
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
h : affineLocally P (f ≫ g)
𝒰 : (i : (Z.affineCover.pullbackCover (f ≫ g)).J) → ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=
  fun i =>
    ((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
          (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).bind
      fun i_1 =>
      (((Scheme.Pullback.openCoverOfRight (pullback g (Z.affineCover.map i)).affineCover f pullback.fst).pushforwardIso
              (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom).obj
          i_1).affineCover
h𝒰 : ∀ (i : (Z.affineCover.pullbackCover (f ≫ g)).J) (j : (𝒰 i).J), IsAffine ((𝒰 i).obj j)
𝒰' : Y.OpenCover := (Z.affineCover.pullbackCover g).bind fun i => ((Z.affineCover.pullbackCover g).obj i).affineCover
⊢ ∀ (i : (i : Z.affineCover.J) × (pullback g (Z.affineCover.map i)).affineCover.J),
    IsAffine ((pullback g (Z.affineCover.map i.fst)).affineCover.obj i.snd)
state_after: no goals