
36 Cal.2d 677 (1951)
STOCKTON DRY GOODS COMPANY (a Corporation), Respondent,
v.
STANLEY GIRSH, Appellant.
Sac. No. 6084. 
Supreme Court of California. In Bank.  
Feb. 2, 1951.
 Willens & Boscoe and Gordon J. Aulik for Appellant.
 Mitchell, Johnson & Bates and Elbert J. Sheffield for Respondent.
 SHENK, J.
 The plaintiff as lessor brought an action against the defendant lessee for declaratory relief pursuant to section 1060 of the Code of Civil Procedure. The existence of a controversy was alleged and placed in issue by the defendant's answer. The trial court found that a controversy existed as to a proper construction of the terms of the lease, and basing its findings on stipulated facts and the language of the lease, rendered judgment for the plaintiff. The defendant appealed.
 The plaintiff owns a department store in the city of Stockton. For about 20 years prior to March, 1944, one Ben Warshauer operated the shoe department of the store under a lease of a portion of the premises. Mr. Warshauer retired and in his place his brother-in-law, the defendant Stanley Girsh, was accepted as the lessee and now conducts the department. A written lease was entered into between the parties on March 7, 1944, providing for the renting of a 20 by 50-foot space on the mezzanine floor near the stairway, "to be conducted as a Shoe Department," for a term of five years with option of *679 renewal for a like term. The consideration was specified as 10 per cent of all net cash sales and 11 per cent of all net charge sales. Other provisions regarding payments for utilities, thrift stamps, matters of wrapping and delivery service, management and sales policies, and privilege of window display space were included.
 The plaintiff alleges that the defendant claims the sole and exclusive right under the lease to operate a shoe department in the store. The plaintiff disputes the claim and in turn asserts the right to set up one or more shoe departments in the store in competition with the defendant. On the trial the court excluded from consideration the defendant's offer of proof of conversations had between the parties prior to the execution of the lease. The evidence was offered as support for an asserted oral understanding that the defendant should have the sole right to conduct a shoe department in the store. The court concluded that the lease provisions did not amount to a grant to the defendant of the sole and exclusive right to operate a shoe department in the store.
 The applicable principles are found in our codified law. The writing embodies the whole of the agreement between the parties and parol evidence to enlarge or explain it is excluded with certain specified exceptions (Code Civ. Proc.,  1856), none of which, as will be seen, is applicable here. The function of the court is to ascertain what in terms or in substance is contained in the instrument and not to insert what has been omitted, or to omit what has been inserted. (Code Civ. Proc.,  1858.) Sections 1856 and 1860 permit the judge to place himself in the position of the parties by receiving evidence of the circumstances under which the agreement was made, which in proper cases may explain an extrinsic ambiguity, establish illegality or fraud, or disclose a mistake or imperfection in the writing. There is here no contention that the language of the lease is ambiguous, that there was any illegality or fraud in the transaction, or any mistaken omission of an agreed provision. Reformation of the lease is not sought. It is not contended that there was a collateral agreement for the exclusive right based on a consideration. It is the defendant's contention that there is implicit in the lease of a portion of the store for the conduct of a shoe department an agreement on the part of the plaintiff that there would not be another shoe department conducted in the store. This is his contention despite the fact that such restrictive language is not in the lease and that a declaration to that effect would be *680 to place a restriction upon the plaintiff's competition with the defendant and to create a covenant as to the use of the portion of the premises retained by the plaintiff without express provision therefor.
 The general invalidity of contractual restraints on trade competition is provided by section 16600 of the Business and Professions Code. However, the prohibition has not been deemed to avoid express restrictive covenants as to the use of retained premises frequently incorporated in leases. (See Medico-Dental etc. Co. v. Horton & Converse, 21 Cal.2d 411 [132 P.2d 457]; Kulawitz v. Pacific etc. Paper Co., 25 Cal.2d 664 [155 P.2d 24].)
 [1] A restrictive covenant as to property retained by a grantor or lessor must be evidenced by a clearly expressed intention. (Wing v. Forest Lawn Cemetery Assn., 15 Cal.2d 472 [101 P.2d 1099, 130 A.L.R. 120]; 51 C.J.  865, 238.) For, as has been universally recognized, "where words do not amount to an agreement, covenant does not lie." (O'Sullivan v. Griffith, 153 Cal. 502, 506 [95 P. 873, 96 P. 323] and authorities cited.)
 The defendant has presented no decision where the court has read in the contract a provision for the restrictive covenant without language to support it. In argument he adopts the word "concession" with reliance on Belvedere Hotel Co. v. Williams, 137 Md. 665 [113 A. 335, 14 A.L.R. 622], wherein the hotel company expressly granted "the barber shop and manicuring concession in its hotel," and the language was held to show an intention to grant the exclusive privilege for the lease term. The defendant also cites Keating v. Preston, 42 Cal.App.2d 110 [108 P.2d 479], where language leasing "all the space ... necessary to do the restaurant business" in the hotel was held to intend the exclusive right to operate a restaurant in the hotel. The cases might be deemed authoritative here had the parties employed similar language.
 The question may not be resolved by what the parties might have provided had they thought about it, nor by what the court might conclude regarding abstract fairness. The question of what is to be included in the contract is for the parties, not for the court, to determine. [2] Here the defendant seeks to build an implied covenant upon an inference from the fact that there had always been but one shoe department in the store. The implication however cannot rest solely upon an inference to be drawn from the facts surrounding the *681 execution of the lease. It must have a basis in the contract itself. [3] A condition cannot be read into a contract as to which the parties might well be deemed to have remained intentionally silent. (Foley v. Euless, 214 Cal. 506, 511 [6 P.2d 956].) [4] With citation of that and other cases, the court in Cousins Inv. Co. v. Hastings Clothing Co., 45 Cal.App.2d 141, 149 [113 P.2d 878], summarized the rules when covenants may be implied as follows: "(1) the implication must arise from the language used or it must be indispensable to effectuate the intention of the parties; (2) it must appear from the language used that it was so clearly within the contemplation of the parties that they deemed it unnecessary to express it; (3) implied covenants can only be justified on the grounds of legal necessity; (4) a promise can be implied only where it can be rightfully assumed that it would have been made if attention had been called to it; (5) there can be no implied covenant where the subject is completely covered by the contract." (See Civ. Code,  1648.)
 [5] Here, without more, a small portion of a department store was let for the purpose of conducting "a shoe department." This is not language expressive of an exclusive grant and such a grant is not indispensable to effectuate the expressed intention of the parties. Nor does that or any language of the lease indicate that an exclusive grant was so clearly contemplated that it would be unnecessary to express it. Likewise there is no legal necessity for it, and it might just as well be assumed that had the attention of the parties been brought to it, they would not have agreed to it. The assumption is also readily apparent from the surrounding circumstances that the parties thought the time might arrive when one shoe department in the store would be insufficient to supply increased customer demand. It is a matter of common knowledge that many stores have more than one department to supply similar lines of goods. Should the court venture to redecide the question for the parties as a matter of construction contrary to the plain words of the agreement, it might well result in an injustice or inequity which they intended to avoid. This case, therefore, is governed by the well-settled principle that the written memorial of the parties supersedes their prior negotiations and becomes their contract (Estate of Gaines, 15 Cal.2d 255, 265 [100 P.2d 1055], citing authorities) and the trial court properly excluded the defendant's offer of proof. *682
 [6] Such questions as when the conduct of another shoe department by the plaintiff will amount to a breach of the covenant of quiet possession (Civ. Code,  1927), and constitute a constructive eviction of the defendant in the absence of an express restriction, cannot be determined in this proceeding. A determination of such matters depends upon the facts in a proper case. (Cf. Lindenberg v. MacDonald, 34 Cal.2d 678 [214 P.2d 5, 14 A.L.R.2d 1436]; Kulawitz v. Pacific etc. Paper Co., supra, 25 Cal.2d 664; Medico-Dental etc. Co. v. Horton & Converse, supra, 21 Cal.2d 411; Aaker v. Smith, 87 Cal.App.2d 36 [196 P.2d 150].) Concern here is only with a construction of the contract to determine the existence of the bare permissive element in the use by the plaintiff of the retained premises. [7] There is no merit in any claimed distinction in this respect because of the prescribed manner of computing the rental payments. That factor might bear on other questions, such as good or bad faith between the parties in their future conduct; but that and other unrelated provisions cannot in the present case supply an unexpressed restriction or grant. As indicated, the trial court has correctly resolved the question of the existence of an agreement for the exclusive conduct of a shoe department by the defendant adversely to his contentions.
 The judgment is affirmed.
 Gibson, C.J., Edmonds, J., Carter, J., Schauer, J., and Spence, J., concurred.
