Difference between in and for in perfect tense with duration

Compare the following sentences:

I have lived here for 10 years. [a]

I have lived here on and off for 10 years. [b]

I have lived here every summer for 10 years. [c]

As I know, the period of time expressed by for in [a] indicates that the living situation lasts AS LONG AS 10 years and there is no vacancy or gap during this period of time.

However, in both [b] and [c], there are definitely blank space in the period of 10 years that I didn't live here. So, Is it better, I think, to change the preposition for to in in these 2 sentences? We therefore have the following two alternative sentences:

I have lived here on and off in the past 10 years. [1b]

I have lived here every summer in the past 10 years. [1c]

• "for" sounds more idiomatic to me. "in" isn't wrong, it just doesn't seem as natural. Commented Jul 11, 2023 at 7:01
• I don't find I have lived here every summer idiomatic. I would say I have spent every summer here for the past 10 years. If you only spend part of the year in a place, you don't live there. Commented Jul 11, 2023 at 7:46
• @Kate Good point. You can of course live in a place for less than a year. It's the iterative aspect 'spending part of the year' demands that makes the sentence improbable. But not impossible. Some people do have different homes and could well establish patterns. But then I think they'd find a better way to express this. Commented Jul 11, 2023 at 11:53

No. In is not better – it is worse.

Firstly:

For indicates a total duration that can be either continuous* or continual**

For = from X to/until Y. If Y is not defined, Y = the present.

*MW: : marked by uninterrupted extension in space, time, or sequence The batteries provide enough power for up to five hours of continuous use.

**2. : recurring in steady, usually rapid, succession a history of continual invasions.

Secondly:

In the example sentences, “on and off / every summer” is a free modifier – it modifies the main clause, which is "I have lived here."

It all depends on the predicate. I follow McCawley's analysis of the senses of the present Perfect construction

The predicate in (a) is a Universal Perfect predicate, a predicate which

• "describes an ongoing continuous situation still true or relevant".

The predicates in (b) and (c), however, are not Universal, but Existential, predicates which

• "describe at least a single occurrence of some potentially important event."

An example is

• I have read that book 5 times.

Of course, reading a book takes time, and doing it 5 times takes even longer; but these are treated as events in an unspecified past time, so the Perfect is OK.

As for the prepositions, they depend on the predicate, too. Active predicates can either have an endpoint (walk to the grocery) or be endpoints (arrive) or have no endpoint (walk, run).

For as a time preposition occurs with no-endpoint predicates

• He ran for an hour; he's been showering for a half-hour.

but not with predicates like arrive or climb the hill.

• *He has arrived for an hour; she has climbed the hill for an hour

For defines the outer time segment in which the predicate is interpreted;
in defines the time it takes to achieve an endpoint

• He has eaten 83 hotdogs in/(*for) 6 minutes and 34 seconds.
• He has eaten hotdogs for decades.

I lived here on and off in the past ten years.

I have lived here on and off in the past ten years.

At some time during the past decade, I lived here intermittently. It might have been only for a few years, maybe five to seven years ago. Or it might have been for the whole ten years. The extent is not clear and unambiguous.

The present perfect version intimates that you are still living there now, intermittently.

NOTE: Compare a question you might encounter on an application for automobile insurance: Have you had any accidents in the past five years? The insurance company wants to know if that ever happened during the five-year period. You could answer, No, for five years now, I've been accident-free.

I lived here on and off for the past ten years.

I lived here intermittently for pretty much every year in the past ten years, certainly throughout the period albeit with gaps. Perhaps I was away at college for four of those years and came home during the summers, and then got a job as a tennis instructor at a mountain resort so I was away all summer for a few years, and then after that I got a job where I had to be flying around the country and was away from home most of the time but this was nonetheless my "permanent address" even though I didn't sleep here more than a few days a month.